diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/system.h | 3 | ||||
-rw-r--r-- | include/asm-arm/system.h | 2 | ||||
-rw-r--r-- | include/asm-arm26/system.h | 2 | ||||
-rw-r--r-- | include/asm-blackfin/system.h | 1 | ||||
-rw-r--r-- | include/asm-h8300/system.h | 1 | ||||
-rw-r--r-- | include/asm-i386/system.h | 2 | ||||
-rw-r--r-- | include/asm-m32r/system.h | 2 | ||||
-rw-r--r-- | include/asm-m68k/system.h | 1 | ||||
-rw-r--r-- | include/asm-m68knommu/system.h | 1 | ||||
-rw-r--r-- | include/asm-mips/system.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/system.h | 2 | ||||
-rw-r--r-- | include/asm-ppc/system.h | 1 | ||||
-rw-r--r-- | include/asm-sh/system.h | 10 | ||||
-rw-r--r-- | include/asm-sh64/system.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/system.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/system.h | 1 | ||||
-rw-r--r-- | include/asm-v850/system.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/system.h | 2 | ||||
-rw-r--r-- | include/asm-xtensa/system.h | 2 |
19 files changed, 0 insertions, 38 deletions
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index 42959c356456..cf1021a97b2e 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -548,9 +548,6 @@ __xchg_u64_local(volatile long *m, unsigned long val) | |||
548 | sizeof(*(ptr))); \ | 548 | sizeof(*(ptr))); \ |
549 | }) | 549 | }) |
550 | 550 | ||
551 | #define tas(ptr) (xchg((ptr),1)) | ||
552 | |||
553 | |||
554 | /* | 551 | /* |
555 | * Atomic compare and exchange. Compare OLD with MEM, if identical, | 552 | * Atomic compare and exchange. Compare OLD with MEM, if identical, |
556 | * store NEW in MEM. Return the initial value in MEM. Success is | 553 | * store NEW in MEM. Return the initial value in MEM. Success is |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 25f84da4a97e..f2da3b6e3a83 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -103,8 +103,6 @@ void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | |||
103 | #define xchg(ptr,x) \ | 103 | #define xchg(ptr,x) \ |
104 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 104 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
105 | 105 | ||
106 | #define tas(ptr) (xchg((ptr),1)) | ||
107 | |||
108 | extern asmlinkage void __backtrace(void); | 106 | extern asmlinkage void __backtrace(void); |
109 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); | 107 | extern asmlinkage void c_backtrace(unsigned long fp, int pmode); |
110 | 108 | ||
diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h index 00ae32aa1dba..4703593b3bb5 100644 --- a/include/asm-arm26/system.h +++ b/include/asm-arm26/system.h | |||
@@ -52,8 +52,6 @@ void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | |||
52 | #define xchg(ptr,x) \ | 52 | #define xchg(ptr,x) \ |
53 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 53 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
54 | 54 | ||
55 | #define tas(ptr) (xchg((ptr),1)) | ||
56 | |||
57 | extern asmlinkage void __backtrace(void); | 55 | extern asmlinkage void __backtrace(void); |
58 | 56 | ||
59 | #define set_cr(x) \ | 57 | #define set_cr(x) \ |
diff --git a/include/asm-blackfin/system.h b/include/asm-blackfin/system.h index 758bac7c1e74..b5bf6e7cb5e8 100644 --- a/include/asm-blackfin/system.h +++ b/include/asm-blackfin/system.h | |||
@@ -138,7 +138,6 @@ extern unsigned long irq_flags; | |||
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 140 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
141 | #define tas(ptr) ((void)xchg((ptr),1)) | ||
142 | 141 | ||
143 | struct __xchg_dummy { | 142 | struct __xchg_dummy { |
144 | unsigned long a[100]; | 143 | unsigned long a[100]; |
diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h index 5084a9d42922..7807018f8500 100644 --- a/include/asm-h8300/system.h +++ b/include/asm-h8300/system.h | |||
@@ -98,7 +98,6 @@ asmlinkage void resume(void); | |||
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 100 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
101 | #define tas(ptr) (xchg((ptr),1)) | ||
102 | 101 | ||
103 | struct __xchg_dummy { unsigned long a[100]; }; | 102 | struct __xchg_dummy { unsigned long a[100]; }; |
104 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) | 103 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) |
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index e0454afb950f..a4ed087ac0ae 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -197,8 +197,6 @@ static inline unsigned long get_limit(unsigned long segment) | |||
197 | 197 | ||
198 | #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) | 198 | #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) |
199 | 199 | ||
200 | #define tas(ptr) (xchg((ptr),1)) | ||
201 | |||
202 | struct __xchg_dummy { unsigned long a[100]; }; | 200 | struct __xchg_dummy { unsigned long a[100]; }; |
203 | #define __xg(x) ((struct __xchg_dummy *)(x)) | 201 | #define __xg(x) ((struct __xchg_dummy *)(x)) |
204 | 202 | ||
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 99ee09889ff7..06cdece35865 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -122,8 +122,6 @@ static inline void local_irq_disable(void) | |||
122 | #define xchg(ptr,x) \ | 122 | #define xchg(ptr,x) \ |
123 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 123 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
124 | 124 | ||
125 | #define tas(ptr) (xchg((ptr),1)) | ||
126 | |||
127 | #ifdef CONFIG_SMP | 125 | #ifdef CONFIG_SMP |
128 | extern void __xchg_called_with_bad_pointer(void); | 126 | extern void __xchg_called_with_bad_pointer(void); |
129 | #endif | 127 | #endif |
diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index 243dd13e6bfc..198878b53a61 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h | |||
@@ -88,7 +88,6 @@ static inline int irqs_disabled(void) | |||
88 | 88 | ||
89 | 89 | ||
90 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 90 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
91 | #define tas(ptr) (xchg((ptr),1)) | ||
92 | 91 | ||
93 | struct __xchg_dummy { unsigned long a[100]; }; | 92 | struct __xchg_dummy { unsigned long a[100]; }; |
94 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) | 93 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) |
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 2a814498672d..5e5ed18bb78f 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h | |||
@@ -120,7 +120,6 @@ asmlinkage void resume(void); | |||
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 122 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
123 | #define tas(ptr) (xchg((ptr),1)) | ||
124 | 123 | ||
125 | struct __xchg_dummy { unsigned long a[100]; }; | 124 | struct __xchg_dummy { unsigned long a[100]; }; |
126 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) | 125 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index d53dd7245561..30f23a2b46ca 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -201,7 +201,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
201 | } | 201 | } |
202 | 202 | ||
203 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 203 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
204 | #define tas(ptr) (xchg((ptr),1)) | ||
205 | 204 | ||
206 | #define __HAVE_ARCH_CMPXCHG 1 | 205 | #define __HAVE_ARCH_CMPXCHG 1 |
207 | 206 | ||
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 77bf5873a013..09621f611dbc 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -335,8 +335,6 @@ __xchg_local(volatile void *ptr, unsigned long x, unsigned int size) | |||
335 | (unsigned long)_x_, sizeof(*(ptr))); \ | 335 | (unsigned long)_x_, sizeof(*(ptr))); \ |
336 | }) | 336 | }) |
337 | 337 | ||
338 | #define tas(ptr) (xchg((ptr),1)) | ||
339 | |||
340 | /* | 338 | /* |
341 | * Compare and exchange - if *p == old, set it to new, | 339 | * Compare and exchange - if *p == old, set it to new, |
342 | * and return the old value of *p. | 340 | * and return the old value of *p. |
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 56abe5e9e155..d84a3cf4d033 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
@@ -169,7 +169,6 @@ xchg_u32(volatile void *p, unsigned long val) | |||
169 | extern void __xchg_called_with_bad_pointer(void); | 169 | extern void __xchg_called_with_bad_pointer(void); |
170 | 170 | ||
171 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 171 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
172 | #define tas(ptr) (xchg((ptr),1)) | ||
173 | 172 | ||
174 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | 173 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) |
175 | { | 174 | { |
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 127af304865f..e7e96ee0c8a5 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -82,16 +82,6 @@ static inline void sched_cacheflush(void) | |||
82 | } | 82 | } |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | static inline unsigned long tas(volatile int *m) | ||
86 | { | ||
87 | unsigned long retval; | ||
88 | |||
89 | __asm__ __volatile__ ("tas.b @%1\n\t" | ||
90 | "movt %0" | ||
91 | : "=r" (retval): "r" (m): "t", "memory"); | ||
92 | return retval; | ||
93 | } | ||
94 | |||
95 | /* | 85 | /* |
96 | * A brief note on ctrl_barrier(), the control register write barrier. | 86 | * A brief note on ctrl_barrier(), the control register write barrier. |
97 | * | 87 | * |
diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h index b1598c26fcb0..5ff94644e8c8 100644 --- a/include/asm-sh64/system.h +++ b/include/asm-sh64/system.h | |||
@@ -43,8 +43,6 @@ extern struct task_struct *sh64_switch_to(struct task_struct *prev, | |||
43 | 43 | ||
44 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 44 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
45 | 45 | ||
46 | #define tas(ptr) (xchg((ptr), 1)) | ||
47 | |||
48 | extern void __xchg_called_with_bad_pointer(void); | 46 | extern void __xchg_called_with_bad_pointer(void); |
49 | 47 | ||
50 | #define mb() __asm__ __volatile__ ("synco": : :"memory") | 48 | #define mb() __asm__ __volatile__ ("synco": : :"memory") |
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index 100c3eaf3c1f..8b6d9c9c8b93 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h | |||
@@ -241,7 +241,6 @@ static inline unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned lon | |||
241 | } | 241 | } |
242 | 242 | ||
243 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 243 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
244 | #define tas(ptr) (xchg((ptr),1)) | ||
245 | 244 | ||
246 | extern void __xchg_called_with_bad_pointer(void); | 245 | extern void __xchg_called_with_bad_pointer(void); |
247 | 246 | ||
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 32281acb878b..8ba380ec6daa 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h | |||
@@ -253,7 +253,6 @@ static inline unsigned long xchg64(__volatile__ unsigned long *m, unsigned long | |||
253 | } | 253 | } |
254 | 254 | ||
255 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 255 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
256 | #define tas(ptr) (xchg((ptr),1)) | ||
257 | 256 | ||
258 | extern void __xchg_called_with_bad_pointer(void); | 257 | extern void __xchg_called_with_bad_pointer(void); |
259 | 258 | ||
diff --git a/include/asm-v850/system.h b/include/asm-v850/system.h index da39916f10b0..0de2481fd990 100644 --- a/include/asm-v850/system.h +++ b/include/asm-v850/system.h | |||
@@ -76,7 +76,6 @@ static inline int irqs_disabled (void) | |||
76 | 76 | ||
77 | #define xchg(ptr, with) \ | 77 | #define xchg(ptr, with) \ |
78 | ((__typeof__ (*(ptr)))__xchg ((unsigned long)(with), (ptr), sizeof (*(ptr)))) | 78 | ((__typeof__ (*(ptr)))__xchg ((unsigned long)(with), (ptr), sizeof (*(ptr)))) |
79 | #define tas(ptr) (xchg ((ptr), 1)) | ||
80 | 79 | ||
81 | static inline unsigned long __xchg (unsigned long with, | 80 | static inline unsigned long __xchg (unsigned long with, |
82 | __volatile__ void *ptr, int size) | 81 | __volatile__ void *ptr, int size) |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index 1f1c0bf4a5df..5316f3cac230 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -126,8 +126,6 @@ static inline void sched_cacheflush(void) | |||
126 | 126 | ||
127 | #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) | 127 | #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) |
128 | 128 | ||
129 | #define tas(ptr) (xchg((ptr),1)) | ||
130 | |||
131 | #define __xg(x) ((volatile long *)(x)) | 129 | #define __xg(x) ((volatile long *)(x)) |
132 | 130 | ||
133 | static inline void set_64bit(volatile unsigned long *ptr, unsigned long val) | 131 | static inline void set_64bit(volatile unsigned long *ptr, unsigned long val) |
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index 4aaed7fe6cfe..ddc970847ae9 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h | |||
@@ -183,8 +183,6 @@ static inline unsigned long xchg_u32(volatile int * m, unsigned long val) | |||
183 | return tmp; | 183 | return tmp; |
184 | } | 184 | } |
185 | 185 | ||
186 | #define tas(ptr) (xchg((ptr),1)) | ||
187 | |||
188 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 186 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
189 | 187 | ||
190 | /* | 188 | /* |