diff options
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/m32r/include/asm/cmpxchg.h | 15 | ||||
-rw-r--r-- | arch/m32r/include/asm/current.h | 15 |
3 files changed, 11 insertions, 20 deletions
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index 652100b64a71..8c24c5e1db66 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild @@ -1,5 +1,6 @@ generic-y += clkdev.h +generic-y += current.h generic-y += exec.h generic-y += irq_work.h generic-y += kvm_para.h diff --git a/arch/m32r/include/asm/cmpxchg.h b/arch/m32r/include/asm/cmpxchg.h index 14bf9b739dd2..23c9d0537201 100644 --- a/arch/m32r/include/asm/cmpxchg.h +++ b/arch/m32r/include/asm/cmpxchg.h @@ -64,8 +64,10 @@ __xchg(unsigned long x, volatile void *ptr, int size) return (tmp); } -#define xchg(ptr, x) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) +#define xchg(ptr, x) ({ \ + ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), \ + sizeof(*(ptr)))); \ +}) static __always_inline unsigned long __xchg_local(unsigned long x, volatile void *ptr, int size) @@ -187,9 +189,12 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) return old; } -#define cmpxchg(ptr, o, n) \ - ((__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)(o), \ - (unsigned long)(n), sizeof(*(ptr)))) +#define cmpxchg(ptr, o, n) ({ \ + ((__typeof__(*(ptr))) \ + __cmpxchg((ptr), (unsigned long)(o), \ + (unsigned long)(n), \ + sizeof(*(ptr)))); \ +}) #include <asm-generic/cmpxchg-local.h> diff --git a/arch/m32r/include/asm/current.h b/arch/m32r/include/asm/current.h deleted file mode 100644 index 7859d864f2c2..000000000000 --- a/arch/m32r/include/asm/current.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _ASM_M32R_CURRENT_H -#define _ASM_M32R_CURRENT_H - -#include <linux/thread_info.h> - -struct task_struct; - -static __inline__ struct task_struct *get_current(void) -{ - return current_thread_info()->task; -} - -#define current (get_current()) - -#endif /* _ASM_M32R_CURRENT_H */ |