diff options
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/include/asm/atomic.h | 12 | ||||
-rw-r--r-- | arch/alpha/include/asm/bitops.h | 3 | ||||
-rw-r--r-- | arch/alpha/include/asm/floppy.h | 2 | ||||
-rw-r--r-- | arch/alpha/include/asm/local.h | 2 | ||||
-rw-r--r-- | arch/alpha/include/asm/ptrace.h | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/perf_event.c | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/alpha/lib/dec_and_lock.c | 2 |
9 files changed, 11 insertions, 16 deletions
diff --git a/arch/alpha/include/asm/atomic.h b/arch/alpha/include/asm/atomic.h index e756d04b6cd..640f909ddd4 100644 --- a/arch/alpha/include/asm/atomic.h +++ b/arch/alpha/include/asm/atomic.h | |||
@@ -176,15 +176,15 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
176 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 176 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
177 | 177 | ||
178 | /** | 178 | /** |
179 | * atomic_add_unless - add unless the number is a given value | 179 | * __atomic_add_unless - add unless the number is a given value |
180 | * @v: pointer of type atomic_t | 180 | * @v: pointer of type atomic_t |
181 | * @a: the amount to add to v... | 181 | * @a: the amount to add to v... |
182 | * @u: ...unless v is equal to u. | 182 | * @u: ...unless v is equal to u. |
183 | * | 183 | * |
184 | * Atomically adds @a to @v, so long as it was not @u. | 184 | * Atomically adds @a to @v, so long as it was not @u. |
185 | * Returns non-zero if @v was not @u, and zero otherwise. | 185 | * Returns the old value of @v. |
186 | */ | 186 | */ |
187 | static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | 187 | static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) |
188 | { | 188 | { |
189 | int c, old; | 189 | int c, old; |
190 | c = atomic_read(v); | 190 | c = atomic_read(v); |
@@ -196,10 +196,9 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
196 | break; | 196 | break; |
197 | c = old; | 197 | c = old; |
198 | } | 198 | } |
199 | return c != (u); | 199 | return c; |
200 | } | 200 | } |
201 | 201 | ||
202 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
203 | 202 | ||
204 | /** | 203 | /** |
205 | * atomic64_add_unless - add unless the number is a given value | 204 | * atomic64_add_unless - add unless the number is a given value |
@@ -208,7 +207,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
208 | * @u: ...unless v is equal to u. | 207 | * @u: ...unless v is equal to u. |
209 | * | 208 | * |
210 | * Atomically adds @a to @v, so long as it was not @u. | 209 | * Atomically adds @a to @v, so long as it was not @u. |
211 | * Returns non-zero if @v was not @u, and zero otherwise. | 210 | * Returns the old value of @v. |
212 | */ | 211 | */ |
213 | static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | 212 | static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) |
214 | { | 213 | { |
@@ -256,5 +255,4 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
256 | #define smp_mb__before_atomic_inc() smp_mb() | 255 | #define smp_mb__before_atomic_inc() smp_mb() |
257 | #define smp_mb__after_atomic_inc() smp_mb() | 256 | #define smp_mb__after_atomic_inc() smp_mb() |
258 | 257 | ||
259 | #include <asm-generic/atomic-long.h> | ||
260 | #endif /* _ALPHA_ATOMIC_H */ | 258 | #endif /* _ALPHA_ATOMIC_H */ |
diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bitops.h index 85b81521577..a19ba5efea4 100644 --- a/arch/alpha/include/asm/bitops.h +++ b/arch/alpha/include/asm/bitops.h | |||
@@ -456,8 +456,7 @@ sched_find_first_bit(const unsigned long b[2]) | |||
456 | 456 | ||
457 | #include <asm-generic/bitops/le.h> | 457 | #include <asm-generic/bitops/le.h> |
458 | 458 | ||
459 | #define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a) | 459 | #include <asm-generic/bitops/ext2-atomic-setbit.h> |
460 | #define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a) | ||
461 | 460 | ||
462 | #endif /* __KERNEL__ */ | 461 | #endif /* __KERNEL__ */ |
463 | 462 | ||
diff --git a/arch/alpha/include/asm/floppy.h b/arch/alpha/include/asm/floppy.h index 0be50413b2b..46cefbd50e7 100644 --- a/arch/alpha/include/asm/floppy.h +++ b/arch/alpha/include/asm/floppy.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #define fd_cacheflush(addr,size) /* nothing */ | 27 | #define fd_cacheflush(addr,size) /* nothing */ |
28 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ | 28 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ |
29 | IRQF_DISABLED, "floppy", NULL) | 29 | IRQF_DISABLED, "floppy", NULL) |
30 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 30 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL) |
31 | 31 | ||
32 | #ifdef CONFIG_PCI | 32 | #ifdef CONFIG_PCI |
33 | 33 | ||
diff --git a/arch/alpha/include/asm/local.h b/arch/alpha/include/asm/local.h index b9e3e331837..9c94b845604 100644 --- a/arch/alpha/include/asm/local.h +++ b/arch/alpha/include/asm/local.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ALPHA_LOCAL_H | 2 | #define _ALPHA_LOCAL_H |
3 | 3 | ||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <asm/atomic.h> | 5 | #include <linux/atomic.h> |
6 | 6 | ||
7 | typedef struct | 7 | typedef struct |
8 | { | 8 | { |
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h index 65cf3e28e2f..fd698a174f2 100644 --- a/arch/alpha/include/asm/ptrace.h +++ b/arch/alpha/include/asm/ptrace.h | |||
@@ -72,7 +72,6 @@ struct switch_stack { | |||
72 | #define user_mode(regs) (((regs)->ps & 8) != 0) | 72 | #define user_mode(regs) (((regs)->ps & 8) != 0) |
73 | #define instruction_pointer(regs) ((regs)->pc) | 73 | #define instruction_pointer(regs) ((regs)->pc) |
74 | #define profile_pc(regs) instruction_pointer(regs) | 74 | #define profile_pc(regs) instruction_pointer(regs) |
75 | extern void show_regs(struct pt_regs *); | ||
76 | 75 | ||
77 | #define task_pt_regs(task) \ | 76 | #define task_pt_regs(task) \ |
78 | ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) | 77 | ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) |
diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index 8e47709160f..8143cd7cdbf 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha/kernel/perf_event.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | 18 | ||
19 | #include <asm/hwrpb.h> | 19 | #include <asm/hwrpb.h> |
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
22 | #include <asm/irq_regs.h> | 22 | #include <asm/irq_regs.h> |
23 | #include <asm/pal.h> | 23 | #include <asm/pal.h> |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 838eac12840..89bbe5b4114 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -200,7 +200,6 @@ show_regs(struct pt_regs *regs) | |||
200 | void | 200 | void |
201 | start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) | 201 | start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) |
202 | { | 202 | { |
203 | set_fs(USER_DS); | ||
204 | regs->pc = pc; | 203 | regs->pc = pc; |
205 | regs->ps = 8; | 204 | regs->ps = 8; |
206 | wrusp(sp); | 205 | wrusp(sp); |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index d739703608f..4087a569b43 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | #include <asm/hwrpb.h> | 32 | #include <asm/hwrpb.h> |
33 | #include <asm/ptrace.h> | 33 | #include <asm/ptrace.h> |
34 | #include <asm/atomic.h> | 34 | #include <linux/atomic.h> |
35 | 35 | ||
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
diff --git a/arch/alpha/lib/dec_and_lock.c b/arch/alpha/lib/dec_and_lock.c index 0f5520d2f45..f9f5fe830e9 100644 --- a/arch/alpha/lib/dec_and_lock.c +++ b/arch/alpha/lib/dec_and_lock.c | |||
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <asm/atomic.h> | 9 | #include <linux/atomic.h> |
10 | 10 | ||
11 | asm (".text \n\ | 11 | asm (".text \n\ |
12 | .global _atomic_dec_and_lock \n\ | 12 | .global _atomic_dec_and_lock \n\ |