From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24733 invoked by alias); 13 Aug 2007 15:22:08 -0000 Received: (qmail 24673 invoked by uid 22791); 13 Aug 2007 15:22:08 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Aug 2007 15:22:03 +0000 Received: from sunsite.mff.cuni.cz (localhost.localdomain [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id l7DFRl6U014604; Mon, 13 Aug 2007 17:27:47 +0200 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.13.8/8.13.8/Submit) id l7DFRloR014603; Mon, 13 Aug 2007 17:27:47 +0200 Date: Mon, 13 Aug 2007 15:22:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] kernel-features.h updates Message-ID: <20070813152747.GO4603@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00016.txt.bz2 Hi! After noticing that even --enable-kernel=2.6.22 x86_64 glibc doesn't assume ppoll/pselect6 syscalls, I decided to skim recent patch-2.6.NN.bz2 and patch-2.6.NN-rc1.bz2 asm-*/unistd.h additions to see when exactly were recent syscalls introduced. 2007-08-13 Jakub Jelinek * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PSELECT, __ASSUME_PPOLL, __ASSUME_ATFCTS, __ASSUME_SET_ROBUST_LIST, __ASSUME_UTIMENSAT, __ASSUME_FALLOCATE): Update per-arch conditions when each feature was introduced. --- libc/sysdeps/unix/sysv/linux/kernel-features.h.jj 2007-07-24 10:50:57.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/kernel-features.h 2007-08-13 17:11:29.000000000 +0200 @@ -428,29 +428,37 @@ # define __ASSUME_TMPFS_NAME 1 #endif -/* pselect was introduced just after 2.6.16-rc1. Due to the way the - kernel versions are advertised we can only rely on 2.6.17 to have - the code. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __x86_64__ +/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way + the kernel versions are advertised we can only rely on 2.6.17 to have + the code. On x86_64 and SH this appeared first in 2.6.19-rc1, + on ia64 in 2.6.22-rc1 and on alpha just after 2.6.22-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020611 \ + && ((!defined __x86_64__ && !defined __sh__ && !defined __ia64__ \ + && !defined __alpha__) \ + || (__LINUX_KERNEL_VERSION >= 0x020613 \ + && (defined __x86_64__ || defined __sh__)) \ + || (__LINUX_KERNEL_VERSION >= 0x020616 && defined __ia64__) \ + || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__)) # define __ASSUME_PSELECT 1 -#endif - -/* ppoll was introduced just after 2.6.16-rc1. Due to the way the - kernel versions are advertised we can only rely on 2.6.17 to have - the code. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __x86_64__ -# define __ASSUME_PPOLL 1 +# define __ASSUME_PPOLL 1 #endif /* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the kernel versions are advertised we can only rely on 2.6.17 to have - the code. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 + the code. On PPC they were introduced in 2.6.17-rc1, on SH in 2.6.19-rc1 + and on Alpha just after 2.6.22-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020611 \ + && ((!defined __sh__ && !defined __alpha__) \ + || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \ + || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__)) # define __ASSUME_ATFCTS 1 #endif /* Support for inter-process robust mutexes was added in 2.6.17. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 +#if __LINUX_KERNEL_VERSION >= 0x020611 \ + && ((!defined __sh__ && !defined __alpha__) \ + || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \ + || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__)) # define __ASSUME_SET_ROBUST_LIST 1 #endif @@ -459,8 +467,11 @@ # define __ASSUME_FUTEX_LOCK_PI 1 #endif -/* Support for utimensat syscall was added in 2.6.22. */ -#if __LINUX_KERNEL_VERSION >= 0x020616 +/* Support for utimensat syscall was added in 2.6.22, on alpha and s390 + only after 2.6.22-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020616 \ + && ((!defined __sh__ && !defined __alpha__) \ + || __LINUX_KERNEL_VERSION >= 0x020617) # define __ASSUME_UTIMENSAT 1 #endif @@ -469,7 +480,10 @@ # define __ASSUME_PRIVATE_FUTEX 1 #endif -/* Support for fallocate was added in 2.6.23. */ -#if __LINUX_KERNEL_VERSION >= 0x020617 +/* Support for fallocate was added in 2.6.23, on s390 + only after 2.6.23-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020617 \ + && ((!defined __s390__ && !defined __alpha__) \ + || (__LINUX_KERNEL_VERSION >= 0x020618 && defined __s390__)) # define __ASSUME_FALLOCATE 1 #endif Jakub