diff options
Diffstat (limited to 'arch/parisc/include/asm')
-rw-r--r-- | arch/parisc/include/asm/atomic.h | 16 | ||||
-rw-r--r-- | arch/parisc/include/asm/bitops.h | 11 | ||||
-rw-r--r-- | arch/parisc/include/asm/dma-mapping.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/mmu_context.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/ptrace.h | 1 |
5 files changed, 9 insertions, 23 deletions
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index 26fd1146dda6..4054b31e0fa9 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h | |||
@@ -197,15 +197,15 @@ static __inline__ int atomic_read(const atomic_t *v) | |||
197 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 197 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
198 | 198 | ||
199 | /** | 199 | /** |
200 | * atomic_add_unless - add unless the number is a given value | 200 | * __atomic_add_unless - add unless the number is a given value |
201 | * @v: pointer of type atomic_t | 201 | * @v: pointer of type atomic_t |
202 | * @a: the amount to add to v... | 202 | * @a: the amount to add to v... |
203 | * @u: ...unless v is equal to u. | 203 | * @u: ...unless v is equal to u. |
204 | * | 204 | * |
205 | * Atomically adds @a to @v, so long as it was not @u. | 205 | * Atomically adds @a to @v, so long as it was not @u. |
206 | * Returns non-zero if @v was not @u, and zero otherwise. | 206 | * Returns the old value of @v. |
207 | */ | 207 | */ |
208 | static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | 208 | static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) |
209 | { | 209 | { |
210 | int c, old; | 210 | int c, old; |
211 | c = atomic_read(v); | 211 | c = atomic_read(v); |
@@ -217,10 +217,9 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
217 | break; | 217 | break; |
218 | c = old; | 218 | c = old; |
219 | } | 219 | } |
220 | return c != (u); | 220 | return c; |
221 | } | 221 | } |
222 | 222 | ||
223 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
224 | 223 | ||
225 | #define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v)))) | 224 | #define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v)))) |
226 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v)))) | 225 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v)))) |
@@ -317,7 +316,7 @@ atomic64_read(const atomic64_t *v) | |||
317 | * @u: ...unless v is equal to u. | 316 | * @u: ...unless v is equal to u. |
318 | * | 317 | * |
319 | * Atomically adds @a to @v, so long as it was not @u. | 318 | * Atomically adds @a to @v, so long as it was not @u. |
320 | * Returns non-zero if @v was not @u, and zero otherwise. | 319 | * Returns the old value of @v. |
321 | */ | 320 | */ |
322 | static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | 321 | static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) |
323 | { | 322 | { |
@@ -336,12 +335,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
336 | 335 | ||
337 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) | 336 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) |
338 | 337 | ||
339 | #else /* CONFIG_64BIT */ | ||
340 | |||
341 | #include <asm-generic/atomic64.h> | ||
342 | |||
343 | #endif /* !CONFIG_64BIT */ | 338 | #endif /* !CONFIG_64BIT */ |
344 | 339 | ||
345 | #include <asm-generic/atomic-long.h> | ||
346 | 340 | ||
347 | #endif /* _ASM_PARISC_ATOMIC_H_ */ | 341 | #endif /* _ASM_PARISC_ATOMIC_H_ */ |
diff --git a/arch/parisc/include/asm/bitops.h b/arch/parisc/include/asm/bitops.h index 43c516fa17ff..8c9b631d2a78 100644 --- a/arch/parisc/include/asm/bitops.h +++ b/arch/parisc/include/asm/bitops.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
9 | #include <asm/types.h> /* for BITS_PER_LONG/SHIFT_PER_LONG */ | 9 | #include <asm/types.h> /* for BITS_PER_LONG/SHIFT_PER_LONG */ |
10 | #include <asm/byteorder.h> | 10 | #include <asm/byteorder.h> |
11 | #include <asm/atomic.h> | 11 | #include <linux/atomic.h> |
12 | 12 | ||
13 | /* | 13 | /* |
14 | * HP-PARISC specific bit operations | 14 | * HP-PARISC specific bit operations |
@@ -223,14 +223,7 @@ static __inline__ int fls(int x) | |||
223 | #ifdef __KERNEL__ | 223 | #ifdef __KERNEL__ |
224 | 224 | ||
225 | #include <asm-generic/bitops/le.h> | 225 | #include <asm-generic/bitops/le.h> |
226 | 226 | #include <asm-generic/bitops/ext2-atomic-setbit.h> | |
227 | /* '3' is bits per byte */ | ||
228 | #define LE_BYTE_ADDR ((sizeof(unsigned long) - 1) << 3) | ||
229 | |||
230 | #define ext2_set_bit_atomic(l,nr,addr) \ | ||
231 | test_and_set_bit((nr) ^ LE_BYTE_ADDR, (unsigned long *)addr) | ||
232 | #define ext2_clear_bit_atomic(l,nr,addr) \ | ||
233 | test_and_clear_bit( (nr) ^ LE_BYTE_ADDR, (unsigned long *)addr) | ||
234 | 227 | ||
235 | #endif /* __KERNEL__ */ | 228 | #endif /* __KERNEL__ */ |
236 | 229 | ||
diff --git a/arch/parisc/include/asm/dma-mapping.h b/arch/parisc/include/asm/dma-mapping.h index 4ef73b09b168..890531e32fe8 100644 --- a/arch/parisc/include/asm/dma-mapping.h +++ b/arch/parisc/include/asm/dma-mapping.h | |||
@@ -210,7 +210,7 @@ parisc_walk_tree(struct device *dev) | |||
210 | return dev->platform_data; | 210 | return dev->platform_data; |
211 | } | 211 | } |
212 | 212 | ||
213 | #define GET_IOC(dev) (HBA_DATA(parisc_walk_tree(dev))->iommu); | 213 | #define GET_IOC(dev) (HBA_DATA(parisc_walk_tree(dev))->iommu) |
214 | 214 | ||
215 | 215 | ||
216 | #ifdef CONFIG_IOMMU_CCIO | 216 | #ifdef CONFIG_IOMMU_CCIO |
diff --git a/arch/parisc/include/asm/mmu_context.h b/arch/parisc/include/asm/mmu_context.h index 354b2aca990e..59be25764433 100644 --- a/arch/parisc/include/asm/mmu_context.h +++ b/arch/parisc/include/asm/mmu_context.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | #include <asm/pgalloc.h> | 7 | #include <asm/pgalloc.h> |
8 | #include <asm/pgtable.h> | 8 | #include <asm/pgtable.h> |
9 | #include <asm-generic/mm_hooks.h> | 9 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/parisc/include/asm/ptrace.h b/arch/parisc/include/asm/ptrace.h index 7f09533da771..250ae35aa062 100644 --- a/arch/parisc/include/asm/ptrace.h +++ b/arch/parisc/include/asm/ptrace.h | |||
@@ -56,7 +56,6 @@ struct pt_regs { | |||
56 | #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) | 56 | #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) |
57 | #define user_stack_pointer(regs) ((regs)->gr[30]) | 57 | #define user_stack_pointer(regs) ((regs)->gr[30]) |
58 | unsigned long profile_pc(struct pt_regs *); | 58 | unsigned long profile_pc(struct pt_regs *); |
59 | extern void show_regs(struct pt_regs *); | ||
60 | 59 | ||
61 | 60 | ||
62 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |