From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964803AbVLMJDU (ORCPT ); Tue, 13 Dec 2005 04:03:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964800AbVLMJDT (ORCPT ); Tue, 13 Dec 2005 04:03:19 -0500 Received: from smtp.osdl.org ([65.172.181.4]:12251 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S964791AbVLMJDO (ORCPT ); Tue, 13 Dec 2005 04:03:14 -0500 Date: Tue, 13 Dec 2005 01:02:33 -0800 From: Andrew Morton To: ak@suse.de, mingo@elte.hu, dhowells@redhat.com, torvalds@osdl.org, hch@infradead.org, arjan@infradead.org, matthew@wil.cx, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation Message-Id: <20051213010233.50fce969.akpm@osdl.org> In-Reply-To: <20051213010126.0832356d.akpm@osdl.org> References: <20051212161944.3185a3f9.akpm@osdl.org> <20051213075441.GB6765@elte.hu> <20051213075835.GZ15804@wotan.suse.de> <20051213004257.0f87d814.akpm@osdl.org> <20051213084926.GN23384@wotan.suse.de> <20051213010126.0832356d.akpm@osdl.org> X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton wrote: > > Thus far I have this: > And this: From: Andrew Morton Remove various things which were checking for gcc-1.x and gcc-2.x compilers. Signed-off-by: Andrew Morton --- arch/arm/kernel/asm-offsets.c | 7 +------ arch/arm26/kernel/asm-offsets.c | 7 ------- arch/ia64/kernel/head.S | 2 +- arch/ia64/kernel/ia64_ksyms.c | 2 +- arch/ia64/oprofile/backtrace.c | 2 +- drivers/md/raid0.c | 6 ------ fs/xfs/xfs_log.h | 8 +------- include/asm-um/rwsem.h | 4 ---- include/asm-v850/unistd.h | 18 ------------------ include/linux/seccomp.h | 6 +----- include/linux/spinlock_types_up.h | 14 -------------- 11 files changed, 6 insertions(+), 70 deletions(-) diff -puN drivers/md/raid0.c~remove-gcc2-checks drivers/md/raid0.c --- devel/drivers/md/raid0.c~remove-gcc2-checks 2005-12-13 00:51:14.000000000 -0800 +++ devel-akpm/drivers/md/raid0.c 2005-12-13 00:51:35.000000000 -0800 @@ -307,9 +307,6 @@ static int raid0_run (mddev_t *mddev) printk("raid0 : conf->hash_spacing is %llu blocks.\n", (unsigned long long)conf->hash_spacing); { -#if __GNUC__ < 3 - volatile -#endif sector_t s = mddev->array_size; sector_t space = conf->hash_spacing; int round; @@ -440,9 +437,6 @@ static int raid0_make_request (request_q { -#if __GNUC__ < 3 - volatile -#endif sector_t x = block >> conf->preshift; sector_div(x, (u32)conf->hash_spacing); zone = conf->hash_table[x]; diff -puN fs/xfs/xfs_log.h~remove-gcc2-checks fs/xfs/xfs_log.h --- devel/fs/xfs/xfs_log.h~remove-gcc2-checks 2005-12-13 00:51:14.000000000 -0800 +++ devel-akpm/fs/xfs/xfs_log.h 2005-12-13 00:52:10.000000000 -0800 @@ -30,13 +30,7 @@ * By comparing each compnent, we don't have to worry about extra * endian issues in treating two 32 bit numbers as one 64 bit number */ -static -#if defined(__GNUC__) && (__GNUC__ == 2) && ( (__GNUC_MINOR__ == 95) || (__GNUC_MINOR__ == 96)) -__attribute__((unused)) /* gcc 2.95, 2.96 miscompile this when inlined */ -#else -__inline__ -#endif -xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2) +static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2) { if (CYCLE_LSN(lsn1) != CYCLE_LSN(lsn2)) return (CYCLE_LSN(lsn1) 2) typedef struct { } raw_spinlock_t; #define __RAW_SPIN_LOCK_UNLOCKED { } -#else -typedef struct { int gcc_is_buggy; } raw_spinlock_t; -#define __RAW_SPIN_LOCK_UNLOCKED (raw_spinlock_t) { 0 } -#endif #endif -#if (__GNUC__ > 2) typedef struct { /* no debug version on UP */ } raw_rwlock_t; #define __RAW_RW_LOCK_UNLOCKED { } -#else -typedef struct { int gcc_is_buggy; } raw_rwlock_t; -#define __RAW_RW_LOCK_UNLOCKED (raw_rwlock_t) { 0 } -#endif #endif /* __LINUX_SPINLOCK_TYPES_UP_H */ diff -puN include/linux/seccomp.h~remove-gcc2-checks include/linux/seccomp.h --- devel/include/linux/seccomp.h~remove-gcc2-checks 2005-12-13 00:51:15.000000000 -0800 +++ devel-akpm/include/linux/seccomp.h 2005-12-13 00:55:25.000000000 -0800 @@ -26,11 +26,7 @@ static inline int has_secure_computing(s #else /* CONFIG_SECCOMP */ -#if (__GNUC__ > 2) - typedef struct { } seccomp_t; -#else - typedef struct { int gcc_is_buggy; } seccomp_t; -#endif +typedef struct { } seccomp_t; #define secure_computing(x) do { } while (0) /* static inline to preserve typechecking */ diff -puN include/asm-um/rwsem.h~remove-gcc2-checks include/asm-um/rwsem.h --- devel/include/asm-um/rwsem.h~remove-gcc2-checks 2005-12-13 00:51:15.000000000 -0800 +++ devel-akpm/include/asm-um/rwsem.h 2005-12-13 00:55:41.000000000 -0800 @@ -1,10 +1,6 @@ #ifndef __UM_RWSEM_H__ #define __UM_RWSEM_H__ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) -#define __builtin_expect(exp,c) (exp) -#endif - #include "asm/arch/rwsem.h" #endif diff -puN include/asm-v850/unistd.h~remove-gcc2-checks include/asm-v850/unistd.h --- devel/include/asm-v850/unistd.h~remove-gcc2-checks 2005-12-13 00:51:15.000000000 -0800 +++ devel-akpm/include/asm-v850/unistd.h 2005-12-13 00:56:07.000000000 -0800 @@ -241,9 +241,6 @@ /* User programs sometimes end up including this header file (indirectly, via uClibc header files), so I'm a bit nervous just including . */ -#if !defined(__builtin_expect) && __GNUC__ == 2 && __GNUC_MINOR__ < 96 -#define __builtin_expect(x, expected_value) (x) -#endif #define __syscall_return(type, res) \ do { \ @@ -346,20 +343,6 @@ type name (atype a, btype b, ctype c, dt __syscall_return (type, __ret); \ } -#if __GNUC__ < 3 -/* In older versions of gcc, `asm' statements with more than 10 - input/output arguments produce a fatal error. To work around this - problem, we use two versions, one for gcc-3.x and one for earlier - versions of gcc (the `earlier gcc' version doesn't work with gcc-3.x - because gcc-3.x doesn't allow clobbers to also be input arguments). */ -#define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f) \ - __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP \ - : "=r" (ret), "=r" (syscall) \ - : "1" (syscall), \ - "r" (a), "r" (b), "r" (c), "r" (d), \ - "r" (e), "r" (f) \ - : SYSCALL_CLOBBERS, SYSCALL_ARG4, SYSCALL_ARG5); -#else /* __GNUC__ >= 3 */ #define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f) \ __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP \ : "=r" (ret), "=r" (syscall), \ @@ -368,7 +351,6 @@ type name (atype a, btype b, ctype c, dt "r" (a), "r" (b), "r" (c), "r" (d), \ "2" (e), "3" (f) \ : SYSCALL_CLOBBERS); -#endif #define _syscall6(type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e, ftype, f) \ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \ _