diff options
| author | David S. Miller <davem@davemloft.net> | 2009-12-01 22:13:38 -0800 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-12-01 22:13:38 -0800 | 
| commit | ff9c38bba37937adb909cceb2a6521f2e92e17c6 (patch) | |
| tree | 93bd6152d9fa28348be99ef1c788040cc7b7a94d /arch/mips/include/asm/system.h | |
| parent | 65c0cfafce9575319fb6f70080fbe226e5617e3b (diff) | |
| parent | b2722b1c3a893ec6021508da15b32282ec79f4da (diff) | |
| download | olio-linux-3.10-ff9c38bba37937adb909cceb2a6521f2e92e17c6.tar.xz olio-linux-3.10-ff9c38bba37937adb909cceb2a6521f2e92e17c6.zip  | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/mac80211/ht.c
Diffstat (limited to 'arch/mips/include/asm/system.h')
| -rw-r--r-- | arch/mips/include/asm/system.h | 15 | 
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h index fcf5f98d90c..83b5509e09e 100644 --- a/arch/mips/include/asm/system.h +++ b/arch/mips/include/asm/system.h @@ -12,6 +12,7 @@  #ifndef _ASM_SYSTEM_H  #define _ASM_SYSTEM_H +#include <linux/kernel.h>  #include <linux/types.h>  #include <linux/irqflags.h> @@ -193,10 +194,6 @@ extern __u64 __xchg_u64_unsupported_on_32bit_kernels(volatile __u64 * m, __u64 v  #define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels  #endif -/* This function doesn't exist, so you'll get a linker error -   if something tries to do an invalid xchg().  */ -extern void __xchg_called_with_bad_pointer(void); -  static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)  {  	switch (size) { @@ -205,11 +202,17 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz  	case 8:  		return __xchg_u64(ptr, x);  	} -	__xchg_called_with_bad_pointer(); +  	return x;  } -#define xchg(ptr, x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) +#define xchg(ptr, x)							\ +({									\ +	BUILD_BUG_ON(sizeof(*(ptr)) & ~0xc);				\ +									\ +	((__typeof__(*(ptr)))						\ +		__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))));	\ +})  extern void set_handler(unsigned long offset, void *addr, unsigned long len);  extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len);  |