diff options
Diffstat (limited to 'arch')
164 files changed, 144 insertions, 173 deletions
diff --git a/arch/alpha/include/asm/atomic.h b/arch/alpha/include/asm/atomic.h index e756d04b6cd5..88b7491490bc 100644 --- a/arch/alpha/include/asm/atomic.h +++ b/arch/alpha/include/asm/atomic.h | |||
@@ -199,7 +199,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
199 | return c != (u); | 199 | return c != (u); |
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 |
diff --git a/arch/alpha/include/asm/local.h b/arch/alpha/include/asm/local.h index b9e3e3318371..9c94b8456043 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/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index 8e47709160f8..8143cd7cdbfb 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/smp.c b/arch/alpha/kernel/smp.c index d739703608fc..4087a569b43b 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 0f5520d2f45f..f9f5fe830e9f 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\ |
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index 7e79503ab89b..4d501f1bdc9d 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h | |||
@@ -217,7 +217,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
217 | c = old; | 217 | c = old; |
218 | return c != u; | 218 | return c != u; |
219 | } | 219 | } |
220 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
221 | 220 | ||
222 | #define atomic_inc(v) atomic_add(1, v) | 221 | #define atomic_inc(v) atomic_add(1, v) |
223 | #define atomic_dec(v) atomic_sub(1, v) | 222 | #define atomic_dec(v) atomic_sub(1, v) |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 167e3cbe1f2f..d88ff0230e82 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/clockchips.h> | 27 | #include <linux/clockchips.h> |
28 | #include <linux/completion.h> | 28 | #include <linux/completion.h> |
29 | 29 | ||
30 | #include <asm/atomic.h> | 30 | #include <linux/atomic.h> |
31 | #include <asm/cacheflush.h> | 31 | #include <asm/cacheflush.h> |
32 | #include <asm/cpu.h> | 32 | #include <asm/cpu.h> |
33 | #include <asm/cputype.h> | 33 | #include <asm/cputype.h> |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 2d3436e9f71f..bc9f9da782cb 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | 27 | ||
28 | #include <asm/atomic.h> | 28 | #include <linux/atomic.h> |
29 | #include <asm/cacheflush.h> | 29 | #include <asm/cacheflush.h> |
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <asm/unistd.h> | 31 | #include <asm/unistd.h> |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index ea53f4d9b283..4159eca78945 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | 21 | ||
22 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
23 | #include <asm/atomic.h> | 23 | #include <linux/atomic.h> |
24 | #include <asm/mach/time.h> | 24 | #include <asm/mach/time.h> |
25 | #include <asm/mach/irq.h> | 25 | #include <asm/mach/irq.h> |
26 | 26 | ||
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index 9f2a948e0e72..0ca00050666a 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/pfn.h> | 36 | #include <linux/pfn.h> |
37 | #include <asm/atomic.h> | 37 | #include <linux/atomic.h> |
38 | #include <mach/dma.h> | 38 | #include <mach/dma.h> |
39 | 39 | ||
40 | /* I don't quite understand why dc4 fails when this is set to 1 and DMA is enabled */ | 40 | /* I don't quite understand why dc4 fails when this is set to 1 and DMA is enabled */ |
diff --git a/arch/arm/mach-cns3xxx/include/mach/pm.h b/arch/arm/mach-cns3xxx/include/mach/pm.h index 6eae7f764d1d..c2588cc991d1 100644 --- a/arch/arm/mach-cns3xxx/include/mach/pm.h +++ b/arch/arm/mach-cns3xxx/include/mach/pm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __CNS3XXX_PM_H | 11 | #ifndef __CNS3XXX_PM_H |
12 | #define __CNS3XXX_PM_H | 12 | #define __CNS3XXX_PM_H |
13 | 13 | ||
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | 15 | ||
16 | void cns3xxx_pwr_clk_en(unsigned int block); | 16 | void cns3xxx_pwr_clk_en(unsigned int block); |
17 | void cns3xxx_pwr_clk_dis(unsigned int block); | 17 | void cns3xxx_pwr_clk_dis(unsigned int block); |
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c index 5e579552aa54..0c04678615ce 100644 --- a/arch/arm/mach-cns3xxx/pm.c +++ b/arch/arm/mach-cns3xxx/pm.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <mach/system.h> | 14 | #include <mach/system.h> |
15 | #include <mach/cns3xxx.h> | 15 | #include <mach/cns3xxx.h> |
16 | #include <mach/pm.h> | 16 | #include <mach/pm.h> |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 98ba9784aa15..495b3987d461 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <linux/io.h> | 44 | #include <linux/io.h> |
45 | 45 | ||
46 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
47 | #include <asm/atomic.h> | 47 | #include <linux/atomic.h> |
48 | #include <asm/mach/time.h> | 48 | #include <asm/mach/time.h> |
49 | #include <asm/mach/irq.h> | 49 | #include <asm/mach/irq.h> |
50 | 50 | ||
diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c index 554e0d3ec70b..f9e6bdaf41d2 100644 --- a/arch/arm/mach-s3c2440/clock.c +++ b/arch/arm/mach-s3c2440/clock.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | 37 | ||
38 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
39 | #include <asm/atomic.h> | 39 | #include <linux/atomic.h> |
40 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
41 | 41 | ||
42 | #include <mach/regs-clock.h> | 42 | #include <mach/regs-clock.h> |
diff --git a/arch/arm/mach-s3c2440/s3c2442.c b/arch/arm/mach-s3c2440/s3c2442.c index 6224bad4d604..9ad99f8016a1 100644 --- a/arch/arm/mach-s3c2440/s3c2442.c +++ b/arch/arm/mach-s3c2440/s3c2442.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
39 | 39 | ||
40 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
41 | #include <asm/atomic.h> | 41 | #include <linux/atomic.h> |
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | 43 | ||
44 | #include <mach/regs-clock.h> | 44 | #include <mach/regs-clock.h> |
diff --git a/arch/arm/mach-s3c2440/s3c244x-clock.c b/arch/arm/mach-s3c2440/s3c244x-clock.c index f8d96130d1d1..7f5ea0a169a5 100644 --- a/arch/arm/mach-s3c2440/s3c244x-clock.c +++ b/arch/arm/mach-s3c2440/s3c244x-clock.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | 36 | ||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <asm/atomic.h> | 38 | #include <linux/atomic.h> |
39 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
40 | 40 | ||
41 | #include <mach/regs-clock.h> | 41 | #include <mach/regs-clock.h> |
diff --git a/arch/avr32/include/asm/atomic.h b/arch/avr32/include/asm/atomic.h index bbce6a1c6bb6..f229c3849f03 100644 --- a/arch/avr32/include/asm/atomic.h +++ b/arch/avr32/include/asm/atomic.h | |||
@@ -188,7 +188,6 @@ static inline int atomic_sub_if_positive(int i, atomic_t *v) | |||
188 | #define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0) | 188 | #define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0) |
189 | #define atomic_add_negative(i, v) (atomic_add_return(i, v) < 0) | 189 | #define atomic_add_negative(i, v) (atomic_add_return(i, v) < 0) |
190 | 190 | ||
191 | #define atomic_inc_not_zero(v) atomic_add_unless(v, 1, 0) | ||
192 | #define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v) | 191 | #define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v) |
193 | 192 | ||
194 | #define smp_mb__before_atomic_dec() barrier() | 193 | #define smp_mb__before_atomic_dec() barrier() |
diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h index 4c707dbe1ff9..f2cf5b714ea4 100644 --- a/arch/blackfin/include/asm/atomic.h +++ b/arch/blackfin/include/asm/atomic.h | |||
@@ -97,7 +97,6 @@ static inline void atomic_set_mask(int mask, atomic_t *v) | |||
97 | c = old; \ | 97 | c = old; \ |
98 | c != (u); \ | 98 | c != (u); \ |
99 | }) | 99 | }) |
100 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
101 | 100 | ||
102 | /* | 101 | /* |
103 | * atomic_inc_and_test - increment and test | 102 | * atomic_inc_and_test - increment and test |
diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h index d9dbc1a53534..dac0c97242bb 100644 --- a/arch/blackfin/include/asm/dma.h +++ b/arch/blackfin/include/asm/dma.h | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <mach/dma.h> | 12 | #include <mach/dma.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <asm/blackfin.h> | 14 | #include <asm/blackfin.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm-generic/dma.h> | 16 | #include <asm-generic/dma.h> |
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h index 9e0cc0e2534f..17b5e92e3bc6 100644 --- a/arch/blackfin/include/asm/ipipe.h +++ b/arch/blackfin/include/asm/ipipe.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/bitops.h> | 34 | #include <asm/bitops.h> |
35 | #include <asm/atomic.h> | 35 | #include <linux/atomic.h> |
36 | #include <asm/traps.h> | 36 | #include <asm/traps.h> |
37 | #include <asm/bitsperlong.h> | 37 | #include <asm/bitsperlong.h> |
38 | 38 | ||
diff --git a/arch/blackfin/include/asm/spinlock.h b/arch/blackfin/include/asm/spinlock.h index 2336093fca23..490c7caa02d9 100644 --- a/arch/blackfin/include/asm/spinlock.h +++ b/arch/blackfin/include/asm/spinlock.h | |||
@@ -11,7 +11,7 @@ | |||
11 | # include <asm-generic/spinlock.h> | 11 | # include <asm-generic/spinlock.h> |
12 | #else | 12 | #else |
13 | 13 | ||
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | 15 | ||
16 | asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr); | 16 | asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr); |
17 | asmlinkage void __raw_spin_lock_asm(volatile int *ptr); | 17 | asmlinkage void __raw_spin_lock_asm(volatile int *ptr); |
diff --git a/arch/blackfin/kernel/ftrace.c b/arch/blackfin/kernel/ftrace.c index 48808a12b427..9277905b82cf 100644 --- a/arch/blackfin/kernel/ftrace.c +++ b/arch/blackfin/kernel/ftrace.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | 14 | ||
15 | #ifdef CONFIG_DYNAMIC_FTRACE | 15 | #ifdef CONFIG_DYNAMIC_FTRACE |
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c index 486426f8a0d7..dbe11220cc53 100644 --- a/arch/blackfin/kernel/ipipe.c +++ b/arch/blackfin/kernel/ipipe.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/unistd.h> | 32 | #include <linux/unistd.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/atomic.h> | 35 | #include <linux/atomic.h> |
36 | #include <asm/irq_handler.h> | 36 | #include <asm/irq_handler.h> |
37 | 37 | ||
38 | DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs); | 38 | DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs); |
diff --git a/arch/blackfin/kernel/nmi.c b/arch/blackfin/kernel/nmi.c index 679d0db35256..9919d29287dc 100644 --- a/arch/blackfin/kernel/nmi.c +++ b/arch/blackfin/kernel/nmi.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <asm/blackfin.h> | 20 | #include <asm/blackfin.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <asm/bfin_watchdog.h> | 23 | #include <asm/bfin_watchdog.h> |
24 | 24 | ||
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 1c143a4de5f5..107622aacf6b 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <asm/atomic.h> | 26 | #include <linux/atomic.h> |
27 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
28 | #include <asm/irq_handler.h> | 28 | #include <asm/irq_handler.h> |
29 | #include <asm/mmu_context.h> | 29 | #include <asm/mmu_context.h> |
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index c03bc3bc30c2..642c6fed43d7 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index a0843a71aaee..0b99df72d2a4 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <asm/mmu_context.h> | 7 | #include <asm/mmu_context.h> |
8 | #include <hwregs/asm/mmu_defs_asm.h> | 8 | #include <hwregs/asm/mmu_defs_asm.h> |
9 | #include <hwregs/supp_reg.h> | 9 | #include <hwregs/supp_reg.h> |
10 | #include <asm/atomic.h> | 10 | #include <linux/atomic.h> |
11 | 11 | ||
12 | #include <linux/err.h> | 12 | #include <linux/err.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/arch/cris/include/asm/atomic.h b/arch/cris/include/asm/atomic.h index 88dc9b9c4ba0..ce9f67e4d977 100644 --- a/arch/cris/include/asm/atomic.h +++ b/arch/cris/include/asm/atomic.h | |||
@@ -150,7 +150,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
150 | cris_atomic_restore(v, flags); | 150 | cris_atomic_restore(v, flags); |
151 | return ret != u; | 151 | return ret != u; |
152 | } | 152 | } |
153 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
154 | 153 | ||
155 | /* Atomic operations are already serializing */ | 154 | /* Atomic operations are already serializing */ |
156 | #define smp_mb__before_atomic_dec() barrier() | 155 | #define smp_mb__before_atomic_dec() barrier() |
diff --git a/arch/cris/include/asm/bitops.h b/arch/cris/include/asm/bitops.h index c0092fc7d846..a78a2d70cd8b 100644 --- a/arch/cris/include/asm/bitops.h +++ b/arch/cris/include/asm/bitops.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #include <arch/bitops.h> | 21 | #include <arch/bitops.h> |
22 | #include <asm/system.h> | 22 | #include <asm/system.h> |
23 | #include <asm/atomic.h> | 23 | #include <linux/atomic.h> |
24 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
25 | 25 | ||
26 | /* | 26 | /* |
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index c99aeab7cef7..aa585e4e979e 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * This file handles the architecture-dependent parts of process handling.. | 12 | * This file handles the architecture-dependent parts of process handling.. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h index fae32c7fdcb6..b07b75f411f2 100644 --- a/arch/frv/include/asm/atomic.h +++ b/arch/frv/include/asm/atomic.h | |||
@@ -256,7 +256,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
256 | return c != (u); | 256 | return c != (u); |
257 | } | 257 | } |
258 | 258 | ||
259 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
260 | 259 | ||
261 | #include <asm-generic/atomic-long.h> | 260 | #include <asm-generic/atomic-long.h> |
262 | #endif /* _ASM_ATOMIC_H */ | 261 | #endif /* _ASM_ATOMIC_H */ |
diff --git a/arch/frv/include/asm/hardirq.h b/arch/frv/include/asm/hardirq.h index 5fc8b6f5bc55..c62833d6ebbb 100644 --- a/arch/frv/include/asm/hardirq.h +++ b/arch/frv/include/asm/hardirq.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #ifndef __ASM_HARDIRQ_H | 12 | #ifndef __ASM_HARDIRQ_H |
13 | #define __ASM_HARDIRQ_H | 13 | #define __ASM_HARDIRQ_H |
14 | 14 | ||
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | 16 | ||
17 | extern atomic_t irq_err_count; | 17 | extern atomic_t irq_err_count; |
18 | static inline void ack_bad_irq(int irq) | 18 | static inline void ack_bad_irq(int irq) |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index a5f624a9f559..3facbc28cbbc 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/bitops.h> | 26 | #include <linux/bitops.h> |
27 | 27 | ||
28 | #include <asm/atomic.h> | 28 | #include <linux/atomic.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | #include <asm/smp.h> | 30 | #include <asm/smp.h> |
31 | #include <asm/system.h> | 31 | #include <asm/system.h> |
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h index 984221abb66d..b641714774ea 100644 --- a/arch/h8300/include/asm/atomic.h +++ b/arch/h8300/include/asm/atomic.h | |||
@@ -116,7 +116,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
116 | local_irq_restore(flags); | 116 | local_irq_restore(flags); |
117 | return ret != u; | 117 | return ret != u; |
118 | } | 118 | } |
119 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
120 | 119 | ||
121 | static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v) | 120 | static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v) |
122 | { | 121 | { |
diff --git a/arch/ia64/include/asm/atomic.h b/arch/ia64/include/asm/atomic.h index 446881439675..fdb887005dff 100644 --- a/arch/ia64/include/asm/atomic.h +++ b/arch/ia64/include/asm/atomic.h | |||
@@ -105,7 +105,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
105 | return c != (u); | 105 | return c != (u); |
106 | } | 106 | } |
107 | 107 | ||
108 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
109 | 108 | ||
110 | static __inline__ long atomic64_add_unless(atomic64_t *v, long a, long u) | 109 | static __inline__ long atomic64_add_unless(atomic64_t *v, long a, long u) |
111 | { | 110 | { |
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h index 03afe7970748..d9f397fae03e 100644 --- a/arch/ia64/include/asm/processor.h +++ b/arch/ia64/include/asm/processor.h | |||
@@ -75,7 +75,7 @@ | |||
75 | #include <asm/percpu.h> | 75 | #include <asm/percpu.h> |
76 | #include <asm/rse.h> | 76 | #include <asm/rse.h> |
77 | #include <asm/unwind.h> | 77 | #include <asm/unwind.h> |
78 | #include <asm/atomic.h> | 78 | #include <linux/atomic.h> |
79 | #ifdef CONFIG_NUMA | 79 | #ifdef CONFIG_NUMA |
80 | #include <asm/nodedata.h> | 80 | #include <asm/nodedata.h> |
81 | #endif | 81 | #endif |
diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h index 1a91c9121d17..b77768d35f93 100644 --- a/arch/ia64/include/asm/spinlock.h +++ b/arch/ia64/include/asm/spinlock.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/bitops.h> | 14 | #include <linux/bitops.h> |
15 | 15 | ||
16 | #include <asm/atomic.h> | 16 | #include <linux/atomic.h> |
17 | #include <asm/intrinsics.h> | 17 | #include <asm/intrinsics.h> |
18 | #include <asm/system.h> | 18 | #include <asm/system.h> |
19 | 19 | ||
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index be450a3e9871..0bd537b4ea6b 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
33 | #include <linux/kexec.h> | 33 | #include <linux/kexec.h> |
34 | 34 | ||
35 | #include <asm/atomic.h> | 35 | #include <linux/atomic.h> |
36 | #include <asm/current.h> | 36 | #include <asm/current.h> |
37 | #include <asm/delay.h> | 37 | #include <asm/delay.h> |
38 | #include <asm/machvec.h> | 38 | #include <asm/machvec.h> |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 14ec641003da..559097986672 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <linux/percpu.h> | 40 | #include <linux/percpu.h> |
41 | #include <linux/bitops.h> | 41 | #include <linux/bitops.h> |
42 | 42 | ||
43 | #include <asm/atomic.h> | 43 | #include <linux/atomic.h> |
44 | #include <asm/cache.h> | 44 | #include <asm/cache.h> |
45 | #include <asm/current.h> | 45 | #include <asm/current.h> |
46 | #include <asm/delay.h> | 46 | #include <asm/delay.h> |
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index c4696d217ce0..6a867dc45c05 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <asm/pal.h> | 25 | #include <asm/pal.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
28 | #include <asm/atomic.h> | 28 | #include <linux/atomic.h> |
29 | #include <asm/tlbflush.h> | 29 | #include <asm/tlbflush.h> |
30 | #include <asm/sn/arch.h> | 30 | #include <asm/sn/arch.h> |
31 | 31 | ||
diff --git a/arch/m32r/include/asm/atomic.h b/arch/m32r/include/asm/atomic.h index d44a51e5271b..d64d894dc549 100644 --- a/arch/m32r/include/asm/atomic.h +++ b/arch/m32r/include/asm/atomic.h | |||
@@ -262,7 +262,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
262 | return c != (u); | 262 | return c != (u); |
263 | } | 263 | } |
264 | 264 | ||
265 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
266 | 265 | ||
267 | static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *addr) | 266 | static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *addr) |
268 | { | 267 | { |
diff --git a/arch/m32r/include/asm/mmu_context.h b/arch/m32r/include/asm/mmu_context.h index a70a3df33635..a979a4198168 100644 --- a/arch/m32r/include/asm/mmu_context.h +++ b/arch/m32r/include/asm/mmu_context.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
13 | 13 | ||
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | #include <asm/pgalloc.h> | 15 | #include <asm/pgalloc.h> |
16 | #include <asm/mmu.h> | 16 | #include <asm/mmu.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
diff --git a/arch/m32r/include/asm/spinlock.h b/arch/m32r/include/asm/spinlock.h index 179a06489b10..b0ea2f26da3b 100644 --- a/arch/m32r/include/asm/spinlock.h +++ b/arch/m32r/include/asm/spinlock.h | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | 15 | ||
16 | /* | 16 | /* |
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index 092d40a6708e..ce7aea34fdf4 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
28 | #include <asm/pgalloc.h> | 28 | #include <asm/pgalloc.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/mmu_context.h> | 31 | #include <asm/mmu_context.h> |
32 | #include <asm/m32r.h> | 32 | #include <asm/m32r.h> |
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index fbd109031df3..ee6a9199561c 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | 25 | ||
26 | #include <asm/smp.h> | 26 | #include <asm/smp.h> |
27 | 27 | ||
diff --git a/arch/m68k/include/asm/atomic.h b/arch/m68k/include/asm/atomic.h index 307a573881ad..e844a2d2ba23 100644 --- a/arch/m68k/include/asm/atomic.h +++ b/arch/m68k/include/asm/atomic.h | |||
@@ -198,7 +198,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
198 | return c != (u); | 198 | return c != (u); |
199 | } | 199 | } |
200 | 200 | ||
201 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
202 | 201 | ||
203 | /* Atomic operations are already serializing */ | 202 | /* Atomic operations are already serializing */ |
204 | #define smp_mb__before_atomic_dec() barrier() | 203 | #define smp_mb__before_atomic_dec() barrier() |
diff --git a/arch/microblaze/include/asm/mmu_context_mm.h b/arch/microblaze/include/asm/mmu_context_mm.h index 3e5c254e8d1c..d68647746448 100644 --- a/arch/microblaze/include/asm/mmu_context_mm.h +++ b/arch/microblaze/include/asm/mmu_context_mm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef _ASM_MICROBLAZE_MMU_CONTEXT_H | 11 | #ifndef _ASM_MICROBLAZE_MMU_CONTEXT_H |
12 | #define _ASM_MICROBLAZE_MMU_CONTEXT_H | 12 | #define _ASM_MICROBLAZE_MMU_CONTEXT_H |
13 | 13 | ||
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | #include <asm/bitops.h> | 15 | #include <asm/bitops.h> |
16 | #include <asm/mmu.h> | 16 | #include <asm/mmu.h> |
17 | #include <asm-generic/mm_hooks.h> | 17 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index 9bd01ecb00d6..9ad567e2d425 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | 25 | ||
26 | #define HAVE_ARCH_DEVTREE_FIXUPS | 26 | #define HAVE_ARCH_DEVTREE_FIXUPS |
27 | 27 | ||
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index 4a02fe891ab6..833a4023648a 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -325,7 +325,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
325 | } | 325 | } |
326 | return c != (u); | 326 | return c != (u); |
327 | } | 327 | } |
328 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
329 | 328 | ||
330 | #define atomic_dec_return(v) atomic_sub_return(1, (v)) | 329 | #define atomic_dec_return(v) atomic_sub_return(1, (v)) |
331 | #define atomic_inc_return(v) atomic_add_return(1, (v)) | 330 | #define atomic_inc_return(v) atomic_add_return(1, (v)) |
diff --git a/arch/mips/include/asm/hw_irq.h b/arch/mips/include/asm/hw_irq.h index 77adda297ad9..9e8ef5994c9c 100644 --- a/arch/mips/include/asm/hw_irq.h +++ b/arch/mips/include/asm/hw_irq.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef __ASM_HW_IRQ_H | 8 | #ifndef __ASM_HW_IRQ_H |
9 | #define __ASM_HW_IRQ_H | 9 | #define __ASM_HW_IRQ_H |
10 | 10 | ||
11 | #include <asm/atomic.h> | 11 | #include <linux/atomic.h> |
12 | 12 | ||
13 | extern atomic_t irq_err_count; | 13 | extern atomic_t irq_err_count; |
14 | 14 | ||
diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h index fffc8307a80a..94fde8d0fac1 100644 --- a/arch/mips/include/asm/local.h +++ b/arch/mips/include/asm/local.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <linux/bitops.h> | 5 | #include <linux/bitops.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | #include <asm/cmpxchg.h> | 7 | #include <asm/cmpxchg.h> |
8 | #include <asm/war.h> | 8 | #include <asm/war.h> |
9 | 9 | ||
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index af42385245d5..d4fb4d852a6d 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/threads.h> | 17 | #include <linux/threads.h> |
18 | #include <linux/cpumask.h> | 18 | #include <linux/cpumask.h> |
19 | 19 | ||
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <asm/smp-ops.h> | 21 | #include <asm/smp-ops.h> |
22 | 22 | ||
23 | extern int smp_num_siblings; | 23 | extern int smp_num_siblings; |
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 9b734d74ae8e..b53970d80991 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/kgdb.h> | 23 | #include <linux/kgdb.h> |
24 | #include <linux/ftrace.h> | 24 | #include <linux/ftrace.h> |
25 | 25 | ||
26 | #include <asm/atomic.h> | 26 | #include <linux/atomic.h> |
27 | #include <asm/system.h> | 27 | #include <asm/system.h> |
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | 29 | ||
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c index b2259e7cd829..594ca69cb867 100644 --- a/arch/mips/kernel/mips-mt.c +++ b/arch/mips/kernel/mips-mt.c | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <asm/cpu.h> | 13 | #include <asm/cpu.h> |
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/hardirq.h> | 17 | #include <asm/hardirq.h> |
18 | #include <asm/mmu_context.h> | 18 | #include <asm/mmu_context.h> |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index 557ef72472e0..7a80b7cda7cc 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <asm/mipsmtregs.h> | 36 | #include <asm/mipsmtregs.h> |
37 | #include <asm/mips_mt.h> | 37 | #include <asm/mips_mt.h> |
38 | #include <asm/cacheflush.h> | 38 | #include <asm/cacheflush.h> |
39 | #include <asm/atomic.h> | 39 | #include <linux/atomic.h> |
40 | #include <asm/cpu.h> | 40 | #include <asm/cpu.h> |
41 | #include <asm/processor.h> | 41 | #include <asm/processor.h> |
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c index cc81771b882c..fe3095160655 100644 --- a/arch/mips/kernel/smp-cmp.c +++ b/arch/mips/kernel/smp-cmp.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> |
27 | 27 | ||
28 | #include <asm/atomic.h> | 28 | #include <linux/atomic.h> |
29 | #include <asm/cacheflush.h> | 29 | #include <asm/cacheflush.h> |
30 | #include <asm/cpu.h> | 30 | #include <asm/cpu.h> |
31 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 1ec56e635d04..ce9e286f0a74 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
25 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | 26 | ||
27 | #include <asm/atomic.h> | 27 | #include <linux/atomic.h> |
28 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
29 | #include <asm/cpu.h> | 29 | #include <asm/cpu.h> |
30 | #include <asm/processor.h> | 30 | #include <asm/processor.h> |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 32a256101082..32c1e954cd37 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/ftrace.h> | 35 | #include <linux/ftrace.h> |
36 | 36 | ||
37 | #include <asm/atomic.h> | 37 | #include <linux/atomic.h> |
38 | #include <asm/cpu.h> | 38 | #include <asm/cpu.h> |
39 | #include <asm/processor.h> | 39 | #include <asm/processor.h> |
40 | #include <asm/r4k-timer.h> | 40 | #include <asm/r4k-timer.h> |
diff --git a/arch/mips/kernel/smtc-proc.c b/arch/mips/kernel/smtc-proc.c index fe256559c997..928a5a61e1a6 100644 --- a/arch/mips/kernel/smtc-proc.c +++ b/arch/mips/kernel/smtc-proc.c | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <asm/cpu.h> | 11 | #include <asm/cpu.h> |
12 | #include <asm/processor.h> | 12 | #include <asm/processor.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <asm/system.h> | 14 | #include <asm/system.h> |
15 | #include <asm/hardirq.h> | 15 | #include <asm/hardirq.h> |
16 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index cedac4633741..f0895e70e283 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
32 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
33 | #include <asm/atomic.h> | 33 | #include <linux/atomic.h> |
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/hardirq.h> | 35 | #include <asm/hardirq.h> |
36 | #include <asm/hazards.h> | 36 | #include <asm/hazards.h> |
diff --git a/arch/mips/kernel/sync-r4k.c b/arch/mips/kernel/sync-r4k.c index 05dd170a83f7..99f913c8d7a6 100644 --- a/arch/mips/kernel/sync-r4k.c +++ b/arch/mips/kernel/sync-r4k.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/cpumask.h> | 16 | #include <linux/cpumask.h> |
17 | 17 | ||
18 | #include <asm/r4k-timer.h> | 18 | #include <asm/r4k-timer.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #include <asm/barrier.h> | 20 | #include <asm/barrier.h> |
21 | #include <asm/mipsregs.h> | 21 | #include <asm/mipsregs.h> |
22 | 22 | ||
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index dbb6b408f001..2cd50ad0d5c6 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <asm/mipsregs.h> | 46 | #include <asm/mipsregs.h> |
47 | #include <asm/mipsmtregs.h> | 47 | #include <asm/mipsmtregs.h> |
48 | #include <asm/cacheflush.h> | 48 | #include <asm/cacheflush.h> |
49 | #include <asm/atomic.h> | 49 | #include <linux/atomic.h> |
50 | #include <asm/cpu.h> | 50 | #include <asm/cpu.h> |
51 | #include <asm/mips_mt.h> | 51 | #include <asm/mips_mt.h> |
52 | #include <asm/processor.h> | 52 | #include <asm/processor.h> |
diff --git a/arch/mips/mipssim/sim_smtc.c b/arch/mips/mipssim/sim_smtc.c index 30df47258c2c..915063991f6e 100644 --- a/arch/mips/mipssim/sim_smtc.c +++ b/arch/mips/mipssim/sim_smtc.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | 26 | ||
27 | #include <asm/atomic.h> | 27 | #include <linux/atomic.h> |
28 | #include <asm/cpu.h> | 28 | #include <asm/cpu.h> |
29 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
30 | #include <asm/smtc.h> | 30 | #include <asm/smtc.h> |
diff --git a/arch/mips/sgi-ip27/ip27-nmi.c b/arch/mips/sgi-ip27/ip27-nmi.c index bc4fa8dd67f3..005c29ed419a 100644 --- a/arch/mips/sgi-ip27/ip27-nmi.c +++ b/arch/mips/sgi-ip27/ip27-nmi.c | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <linux/nodemask.h> | 3 | #include <linux/nodemask.h> |
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | #include <asm/sn/types.h> | 7 | #include <asm/sn/types.h> |
8 | #include <asm/sn/addrs.h> | 8 | #include <asm/sn/addrs.h> |
9 | #include <asm/sn/nmi.h> | 9 | #include <asm/sn/nmi.h> |
diff --git a/arch/mn10300/include/asm/atomic.h b/arch/mn10300/include/asm/atomic.h index 9d773a639513..041b9d69d86c 100644 --- a/arch/mn10300/include/asm/atomic.h +++ b/arch/mn10300/include/asm/atomic.h | |||
@@ -269,7 +269,6 @@ static inline void atomic_dec(atomic_t *v) | |||
269 | c != (u); \ | 269 | c != (u); \ |
270 | }) | 270 | }) |
271 | 271 | ||
272 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
273 | 272 | ||
274 | /** | 273 | /** |
275 | * atomic_clear_mask - Atomically clear bits in memory | 274 | * atomic_clear_mask - Atomically clear bits in memory |
diff --git a/arch/mn10300/include/asm/mmu_context.h b/arch/mn10300/include/asm/mmu_context.h index c8f6c82672ad..c67c2b5365a6 100644 --- a/arch/mn10300/include/asm/mmu_context.h +++ b/arch/mn10300/include/asm/mmu_context.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #ifndef _ASM_MMU_CONTEXT_H | 22 | #ifndef _ASM_MMU_CONTEXT_H |
23 | #define _ASM_MMU_CONTEXT_H | 23 | #define _ASM_MMU_CONTEXT_H |
24 | 24 | ||
25 | #include <asm/atomic.h> | 25 | #include <linux/atomic.h> |
26 | #include <asm/pgalloc.h> | 26 | #include <asm/pgalloc.h> |
27 | #include <asm/tlbflush.h> | 27 | #include <asm/tlbflush.h> |
28 | #include <asm-generic/mm_hooks.h> | 28 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/mn10300/include/asm/spinlock.h b/arch/mn10300/include/asm/spinlock.h index 93429154e898..1ae580f38933 100644 --- a/arch/mn10300/include/asm/spinlock.h +++ b/arch/mn10300/include/asm/spinlock.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef _ASM_SPINLOCK_H | 11 | #ifndef _ASM_SPINLOCK_H |
12 | #define _ASM_SPINLOCK_H | 12 | #define _ASM_SPINLOCK_H |
13 | 13 | ||
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | #include <asm/rwlock.h> | 15 | #include <asm/rwlock.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | 17 | ||
diff --git a/arch/mn10300/include/asm/system.h b/arch/mn10300/include/asm/system.h index 8ff3e5aaca41..94b4c5e1491b 100644 --- a/arch/mn10300/include/asm/system.h +++ b/arch/mn10300/include/asm/system.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/irqflags.h> | 21 | #include <linux/irqflags.h> |
22 | #include <asm/atomic.h> | 22 | #include <linux/atomic.h> |
23 | 23 | ||
24 | #if !defined(CONFIG_LAZY_SAVE_FPU) | 24 | #if !defined(CONFIG_LAZY_SAVE_FPU) |
25 | struct fpu_state_struct; | 25 | struct fpu_state_struct; |
diff --git a/arch/mn10300/kernel/mn10300-watchdog.c b/arch/mn10300/kernel/mn10300-watchdog.c index c5e12bfd9fcd..a45f0c7549a6 100644 --- a/arch/mn10300/kernel/mn10300-watchdog.c +++ b/arch/mn10300/kernel/mn10300-watchdog.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/nmi.h> | 19 | #include <linux/nmi.h> |
20 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include <asm/atomic.h> | 22 | #include <linux/atomic.h> |
23 | #include <asm/intctl-regs.h> | 23 | #include <asm/intctl-regs.h> |
24 | #include <asm/rtc-regs.h> | 24 | #include <asm/rtc-regs.h> |
25 | #include <asm/div64.h> | 25 | #include <asm/div64.h> |
diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c index bd3e5e73826e..9220a75a7b43 100644 --- a/arch/mn10300/kernel/traps.c +++ b/arch/mn10300/kernel/traps.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <asm/io.h> | 32 | #include <asm/io.h> |
33 | #include <asm/atomic.h> | 33 | #include <linux/atomic.h> |
34 | #include <asm/smp.h> | 34 | #include <asm/smp.h> |
35 | #include <asm/pgalloc.h> | 35 | #include <asm/pgalloc.h> |
36 | #include <asm/cacheflush.h> | 36 | #include <asm/cacheflush.h> |
diff --git a/arch/mn10300/mm/misalignment.c b/arch/mn10300/mm/misalignment.c index eef989c1d0c1..f9bb8cb1c14a 100644 --- a/arch/mn10300/mm/misalignment.c +++ b/arch/mn10300/mm/misalignment.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
28 | #include <asm/io.h> | 28 | #include <asm/io.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <asm/smp.h> | 30 | #include <asm/smp.h> |
31 | #include <asm/pgalloc.h> | 31 | #include <asm/pgalloc.h> |
32 | #include <asm/cpu-regs.h> | 32 | #include <asm/cpu-regs.h> |
diff --git a/arch/mn10300/proc-mn2ws0050/proc-init.c b/arch/mn10300/proc-mn2ws0050/proc-init.c index c58249b9525a..fe6e24906ffc 100644 --- a/arch/mn10300/proc-mn2ws0050/proc-init.c +++ b/arch/mn10300/proc-mn2ws0050/proc-init.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/system.h> | 18 | #include <asm/system.h> |
19 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | #include <asm/smp.h> | 22 | #include <asm/smp.h> |
23 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
24 | #include <asm/busctl-regs.h> | 24 | #include <asm/busctl-regs.h> |
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index f81955934aeb..192488999b63 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h | |||
@@ -220,7 +220,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
220 | return c != (u); | 220 | return c != (u); |
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)))) |
diff --git a/arch/parisc/include/asm/bitops.h b/arch/parisc/include/asm/bitops.h index 4e833aa05a44..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 |
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/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index df653663d3db..a7bb757a5497 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | EXPORT_SYMBOL(memset); | 32 | EXPORT_SYMBOL(memset); |
33 | 33 | ||
34 | #include <asm/atomic.h> | 34 | #include <linux/atomic.h> |
35 | EXPORT_SYMBOL(__xchg8); | 35 | EXPORT_SYMBOL(__xchg8); |
36 | EXPORT_SYMBOL(__xchg32); | 36 | EXPORT_SYMBOL(__xchg32); |
37 | EXPORT_SYMBOL(__cmpxchg_u32); | 37 | EXPORT_SYMBOL(__cmpxchg_u32); |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 828305f19cff..32d588488f04 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/ftrace.h> | 33 | #include <linux/ftrace.h> |
34 | 34 | ||
35 | #include <asm/system.h> | 35 | #include <asm/system.h> |
36 | #include <asm/atomic.h> | 36 | #include <linux/atomic.h> |
37 | #include <asm/current.h> | 37 | #include <asm/current.h> |
38 | #include <asm/delay.h> | 38 | #include <asm/delay.h> |
39 | #include <asm/tlbflush.h> | 39 | #include <asm/tlbflush.h> |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 8b58bf0b7d5a..f19e6604026a 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/traps.h> | 34 | #include <asm/traps.h> |
35 | #include <asm/unaligned.h> | 35 | #include <asm/unaligned.h> |
36 | #include <asm/atomic.h> | 36 | #include <linux/atomic.h> |
37 | #include <asm/smp.h> | 37 | #include <asm/smp.h> |
38 | #include <asm/pdc.h> | 38 | #include <asm/pdc.h> |
39 | #include <asm/pdc_chassis.h> | 39 | #include <asm/pdc_chassis.h> |
diff --git a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c index 353963d42059..a8bffd8af77d 100644 --- a/arch/parisc/lib/bitops.c +++ b/arch/parisc/lib/bitops.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <asm/system.h> | 11 | #include <asm/system.h> |
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | 13 | ||
14 | #ifdef CONFIG_SMP | 14 | #ifdef CONFIG_SMP |
15 | arch_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { | 15 | arch_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { |
diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h index b8f152ece025..b2bcbee622ea 100644 --- a/arch/powerpc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h | |||
@@ -212,7 +212,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
212 | return t != u; | 212 | return t != u; |
213 | } | 213 | } |
214 | 214 | ||
215 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
216 | 215 | ||
217 | #define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0) | 216 | #define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0) |
218 | #define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0) | 217 | #define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0) |
diff --git a/arch/powerpc/include/asm/emulated_ops.h b/arch/powerpc/include/asm/emulated_ops.h index 2cc41c715d2b..63f2a22e9954 100644 --- a/arch/powerpc/include/asm/emulated_ops.h +++ b/arch/powerpc/include/asm/emulated_ops.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #ifndef _ASM_POWERPC_EMULATED_OPS_H | 18 | #ifndef _ASM_POWERPC_EMULATED_OPS_H |
19 | #define _ASM_POWERPC_EMULATED_OPS_H | 19 | #define _ASM_POWERPC_EMULATED_OPS_H |
20 | 20 | ||
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | #include <linux/perf_event.h> | 22 | #include <linux/perf_event.h> |
23 | 23 | ||
24 | 24 | ||
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index c57a28e52b64..c0e1bc319e35 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/radix-tree.h> | 14 | #include <linux/radix-tree.h> |
15 | 15 | ||
16 | #include <asm/types.h> | 16 | #include <asm/types.h> |
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | 18 | ||
19 | 19 | ||
20 | /* Define a way to iterate across irqs. */ | 20 | /* Define a way to iterate across irqs. */ |
diff --git a/arch/powerpc/include/asm/local.h b/arch/powerpc/include/asm/local.h index c2410af6bfd9..b8da91363864 100644 --- a/arch/powerpc/include/asm/local.h +++ b/arch/powerpc/include/asm/local.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ARCH_POWERPC_LOCAL_H | 2 | #define _ARCH_POWERPC_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/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h index b823536375dc..b5c91901e384 100644 --- a/arch/powerpc/include/asm/prom.h +++ b/arch/powerpc/include/asm/prom.h | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | 22 | ||
23 | #define HAVE_ARCH_DEVTREE_FIXUPS | 23 | #define HAVE_ARCH_DEVTREE_FIXUPS |
24 | 24 | ||
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 24582181b6ec..59dbf6abaaf3 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/topology.h> | 26 | #include <asm/topology.h> |
27 | #include <asm/pci-bridge.h> | 27 | #include <asm/pci-bridge.h> |
28 | #include <asm/ppc-pci.h> | 28 | #include <asm/ppc-pci.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | 30 | ||
31 | #ifdef CONFIG_PPC_OF_PLATFORM_PCI | 31 | #ifdef CONFIG_PPC_OF_PLATFORM_PCI |
32 | 32 | ||
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 7d28f540200c..f5ae872a2ef0 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | #include <asm/checksum.h> | 22 | #include <asm/checksum.h> |
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 0e0ea941156f..d5ca8236315c 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/udbg.h> | 39 | #include <asm/udbg.h> |
40 | #include <asm/syscalls.h> | 40 | #include <asm/syscalls.h> |
41 | #include <asm/smp.h> | 41 | #include <asm/smp.h> |
42 | #include <asm/atomic.h> | 42 | #include <linux/atomic.h> |
43 | #include <asm/time.h> | 43 | #include <asm/time.h> |
44 | #include <asm/mmu.h> | 44 | #include <asm/mmu.h> |
45 | #include <asm/topology.h> | 45 | #include <asm/topology.h> |
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 67f6c3b51357..481ef064c8f1 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <asm/rtas.h> | 27 | #include <asm/rtas.h> |
28 | #include <asm/prom.h> | 28 | #include <asm/prom.h> |
29 | #include <asm/nvram.h> | 29 | #include <asm/nvram.h> |
30 | #include <asm/atomic.h> | 30 | #include <linux/atomic.h> |
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | 32 | ||
33 | 33 | ||
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c index 03e45c4a9ef1..640de836e466 100644 --- a/arch/powerpc/kernel/smp-tbsync.c +++ b/arch/powerpc/kernel/smp-tbsync.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/unistd.h> | 11 | #include <linux/unistd.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | #include <asm/smp.h> | 15 | #include <asm/smp.h> |
16 | #include <asm/time.h> | 16 | #include <asm/time.h> |
17 | 17 | ||
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index f932f8a0cf0c..7bf2187dfd99 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/topology.h> | 33 | #include <linux/topology.h> |
34 | 34 | ||
35 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
36 | #include <asm/atomic.h> | 36 | #include <linux/atomic.h> |
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/page.h> | 38 | #include <asm/page.h> |
39 | #include <asm/pgtable.h> | 39 | #include <asm/pgtable.h> |
diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c index f8fa2fc3129f..c55129f5760a 100644 --- a/arch/powerpc/platforms/83xx/km83xx.c +++ b/arch/powerpc/platforms/83xx/km83xx.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/of_device.h> | 28 | #include <linux/of_device.h> |
29 | 29 | ||
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <asm/atomic.h> | 31 | #include <linux/atomic.h> |
32 | #include <asm/time.h> | 32 | #include <asm/time.h> |
33 | #include <asm/io.h> | 33 | #include <asm/io.h> |
34 | #include <asm/machdep.h> | 34 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 93e60f1f21a9..32a52896822f 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/of_device.h> | 27 | #include <linux/of_device.h> |
28 | 28 | ||
29 | #include <asm/system.h> | 29 | #include <asm/system.h> |
30 | #include <asm/atomic.h> | 30 | #include <linux/atomic.h> |
31 | #include <asm/time.h> | 31 | #include <asm/time.h> |
32 | #include <asm/io.h> | 32 | #include <asm/io.h> |
33 | #include <asm/machdep.h> | 33 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 81e44fa1c644..6b45969567d4 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | 27 | ||
28 | #include <asm/system.h> | 28 | #include <asm/system.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <asm/time.h> | 30 | #include <asm/time.h> |
31 | #include <asm/io.h> | 31 | #include <asm/io.h> |
32 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index c1b1dc50b32a..041c5177e737 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | 27 | ||
28 | #include <asm/system.h> | 28 | #include <asm/system.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <asm/time.h> | 30 | #include <asm/time.h> |
31 | #include <asm/io.h> | 31 | #include <asm/io.h> |
32 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index 81c052b1353e..934cc8c46bbc 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/of_device.h> | 34 | #include <linux/of_device.h> |
35 | 35 | ||
36 | #include <asm/system.h> | 36 | #include <asm/system.h> |
37 | #include <asm/atomic.h> | 37 | #include <linux/atomic.h> |
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | #include <asm/machdep.h> | 40 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c index 49023dbe1576..af41d8c810a8 100644 --- a/arch/powerpc/platforms/83xx/sbc834x.c +++ b/arch/powerpc/platforms/83xx/sbc834x.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
29 | 29 | ||
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <asm/atomic.h> | 31 | #include <linux/atomic.h> |
32 | #include <asm/time.h> | 32 | #include <asm/time.h> |
33 | #include <asm/io.h> | 33 | #include <asm/io.h> |
34 | #include <asm/machdep.h> | 34 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 6299a2a51ae8..2bf99786d249 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/system.h> | 31 | #include <asm/system.h> |
32 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
33 | #include <asm/page.h> | 33 | #include <asm/page.h> |
34 | #include <asm/atomic.h> | 34 | #include <linux/atomic.h> |
35 | #include <asm/time.h> | 35 | #include <asm/time.h> |
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
37 | #include <asm/machdep.h> | 37 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 747d1ee661fd..973b3f4a4b49 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <linux/memblock.h> | 36 | #include <linux/memblock.h> |
37 | 37 | ||
38 | #include <asm/system.h> | 38 | #include <asm/system.h> |
39 | #include <asm/atomic.h> | 39 | #include <linux/atomic.h> |
40 | #include <asm/time.h> | 40 | #include <asm/time.h> |
41 | #include <asm/io.h> | 41 | #include <asm/io.h> |
42 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c index ecdd8c09e4ed..d07dcb7f4ee9 100644 --- a/arch/powerpc/platforms/85xx/sbc8548.c +++ b/arch/powerpc/platforms/85xx/sbc8548.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/page.h> | 36 | #include <asm/page.h> |
37 | #include <asm/atomic.h> | 37 | #include <linux/atomic.h> |
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | #include <asm/machdep.h> | 40 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/cell/cpufreq_spudemand.c b/arch/powerpc/platforms/cell/cpufreq_spudemand.c index d809836bcf5f..7f92096fe968 100644 --- a/arch/powerpc/platforms/cell/cpufreq_spudemand.c +++ b/arch/powerpc/platforms/cell/cpufreq_spudemand.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <asm/atomic.h> | 27 | #include <linux/atomic.h> |
28 | #include <asm/machdep.h> | 28 | #include <asm/machdep.h> |
29 | #include <asm/spu.h> | 29 | #include <asm/spu.h> |
30 | 30 | ||
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index dbb641ea90dd..f2e1dfe4bf31 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/cpu.h> | 28 | #include <linux/cpu.h> |
29 | 29 | ||
30 | #include <asm/ptrace.h> | 30 | #include <asm/ptrace.h> |
31 | #include <asm/atomic.h> | 31 | #include <linux/atomic.h> |
32 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
33 | #include <asm/page.h> | 33 | #include <asm/page.h> |
34 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 0c87bcd2452a..bf4d41d8fa14 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <asm/atomic.h> | 27 | #include <linux/atomic.h> |
28 | #include <asm/spu.h> | 28 | #include <asm/spu.h> |
29 | #include <asm/spu_csa.h> | 29 | #include <asm/spu_csa.h> |
30 | #include "spufs.h" | 30 | #include "spufs.h" |
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index a800122e4dda..feab30bbae23 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | 19 | ||
20 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c index 2df48c2287bd..8bda9be06fa0 100644 --- a/arch/powerpc/platforms/iseries/smp.c +++ b/arch/powerpc/platforms/iseries/smp.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/cpu.h> | 29 | #include <linux/cpu.h> |
30 | 30 | ||
31 | #include <asm/ptrace.h> | 31 | #include <asm/ptrace.h> |
32 | #include <asm/atomic.h> | 32 | #include <linux/atomic.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/page.h> | 34 | #include <asm/page.h> |
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c index d679964ae2ab..c2f3e861f5ea 100644 --- a/arch/powerpc/platforms/powermac/backlight.c +++ b/arch/powerpc/platforms/powermac/backlight.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/backlight.h> | 12 | #include <linux/backlight.h> |
13 | #include <linux/adb.h> | 13 | #include <linux/adb.h> |
14 | #include <linux/pmu.h> | 14 | #include <linux/pmu.h> |
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | #include <asm/prom.h> | 16 | #include <asm/prom.h> |
17 | #include <asm/backlight.h> | 17 | #include <asm/backlight.h> |
18 | 18 | ||
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index d15fca322978..9a521dc8e485 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/compiler.h> | 35 | #include <linux/compiler.h> |
36 | 36 | ||
37 | #include <asm/ptrace.h> | 37 | #include <asm/ptrace.h> |
38 | #include <asm/atomic.h> | 38 | #include <linux/atomic.h> |
39 | #include <asm/code-patching.h> | 39 | #include <asm/code-patching.h> |
40 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
41 | #include <asm/page.h> | 41 | #include <asm/page.h> |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 46b55cf563e3..ada6e07532ec 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
32 | #include <linux/of.h> | 32 | #include <linux/of.h> |
33 | 33 | ||
34 | #include <asm/atomic.h> | 34 | #include <linux/atomic.h> |
35 | #include <asm/eeh.h> | 35 | #include <asm/eeh.h> |
36 | #include <asm/eeh_event.h> | 36 | #include <asm/eeh_event.h> |
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c index 8ed0d2d0e1b5..fc5ae767989e 100644 --- a/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/arch/powerpc/platforms/pseries/eeh_cache.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/rbtree.h> | 25 | #include <linux/rbtree.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <asm/atomic.h> | 28 | #include <linux/atomic.h> |
29 | #include <asm/pci-bridge.h> | 29 | #include <asm/pci-bridge.h> |
30 | #include <asm/ppc-pci.h> | 30 | #include <asm/ppc-pci.h> |
31 | 31 | ||
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 1672db2d1b0e..4e44c4dcd11c 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/cpu.h> | 27 | #include <linux/cpu.h> |
28 | 28 | ||
29 | #include <asm/ptrace.h> | 29 | #include <asm/ptrace.h> |
30 | #include <asm/atomic.h> | 30 | #include <linux/atomic.h> |
31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
32 | #include <asm/page.h> | 32 | #include <asm/page.h> |
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 265313e8396b..2d66275e489f 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/fs_uart_pd.h> | 32 | #include <linux/fs_uart_pd.h> |
33 | 33 | ||
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/atomic.h> | 35 | #include <linux/atomic.h> |
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c index ee056807b52c..9f51f97abb5d 100644 --- a/arch/powerpc/sysdev/tsi108_dev.c +++ b/arch/powerpc/sysdev/tsi108_dev.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/tsi108.h> | 23 | #include <asm/tsi108.h> |
24 | 24 | ||
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | #include <asm/atomic.h> | 26 | #include <linux/atomic.h> |
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/prom.h> | 29 | #include <asm/prom.h> |
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h index d9db13810d15..29d756329228 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
@@ -108,7 +108,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
108 | return c != u; | 108 | return c != u; |
109 | } | 109 | } |
110 | 110 | ||
111 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
112 | 111 | ||
113 | #undef __CS_LOOP | 112 | #undef __CS_LOOP |
114 | 113 | ||
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 1ca3d1d6a86c..45df6d456aa1 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <asm/system.h> | 27 | #include <asm/system.h> |
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | #include <asm/atomic.h> | 30 | #include <linux/atomic.h> |
31 | #include <asm/mathemu.h> | 31 | #include <asm/mathemu.h> |
32 | #include <asm/cpcmd.h> | 32 | #include <asm/cpcmd.h> |
33 | #include <asm/lowcore.h> | 33 | #include <asm/lowcore.h> |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index e9372c77cced..ffabcd9d3363 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <asm/system.h> | 36 | #include <asm/system.h> |
37 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/atomic.h> | 39 | #include <linux/atomic.h> |
40 | #include <asm/mathemu.h> | 40 | #include <asm/mathemu.h> |
41 | #include <asm/cpcmd.h> | 41 | #include <asm/cpcmd.h> |
42 | #include <asm/lowcore.h> | 42 | #include <asm/lowcore.h> |
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h index c7983124d99d..8ddb2635cf92 100644 --- a/arch/sh/include/asm/atomic.h +++ b/arch/sh/include/asm/atomic.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) | 30 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) |
31 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) | 31 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) |
32 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 32 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) |
33 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
34 | 33 | ||
35 | #define atomic_inc(v) atomic_add(1, (v)) | 34 | #define atomic_inc(v) atomic_add(1, (v)) |
36 | #define atomic_dec(v) atomic_sub(1, (v)) | 35 | #define atomic_dec(v) atomic_sub(1, (v)) |
diff --git a/arch/sh/include/asm/hw_irq.h b/arch/sh/include/asm/hw_irq.h index 603cdde813d1..693d44184058 100644 --- a/arch/sh/include/asm/hw_irq.h +++ b/arch/sh/include/asm/hw_irq.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | #include <linux/sh_intc.h> | 5 | #include <linux/sh_intc.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | 7 | ||
8 | extern atomic_t irq_err_count; | 8 | extern atomic_t irq_err_count; |
9 | 9 | ||
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h index 9070d943ddde..78b0d0f4b24b 100644 --- a/arch/sh/include/asm/smp.h +++ b/arch/sh/include/asm/smp.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifdef CONFIG_SMP | 8 | #ifdef CONFIG_SMP |
9 | 9 | ||
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <asm/atomic.h> | 11 | #include <linux/atomic.h> |
12 | #include <asm/current.h> | 12 | #include <asm/current.h> |
13 | #include <asm/percpu.h> | 13 | #include <asm/percpu.h> |
14 | 14 | ||
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 425d604e3a28..84db0d6ccd0d 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <asm/pgalloc.h> | 19 | #include <asm/pgalloc.h> |
20 | #include <asm/system.h> | 20 | #include <asm/system.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | #include <asm/smp.h> | 22 | #include <asm/smp.h> |
23 | 23 | ||
24 | void (*pm_idle)(void) = NULL; | 24 | void (*pm_idle)(void) = NULL; |
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 6207561ea34a..3147a9a6fb8b 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c index 67110be83fd7..cd3a40483299 100644 --- a/arch/sh/kernel/traps_64.c +++ b/arch/sh/kernel/traps_64.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <asm/system.h> | 28 | #include <asm/system.h> |
29 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/atomic.h> | 31 | #include <linux/atomic.h> |
32 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/fpu.h> | 34 | #include <asm/fpu.h> |
diff --git a/arch/sh/kernel/unwinder.c b/arch/sh/kernel/unwinder.c index 468889d958f4..521b5432471f 100644 --- a/arch/sh/kernel/unwinder.c +++ b/arch/sh/kernel/unwinder.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <asm/unwinder.h> | 15 | #include <asm/unwinder.h> |
16 | #include <asm/atomic.h> | 16 | #include <linux/atomic.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * This is the most basic stack unwinder an architecture can | 19 | * This is the most basic stack unwinder an architecture can |
diff --git a/arch/sparc/include/asm/atomic_32.h b/arch/sparc/include/asm/atomic_32.h index 7ae128b19d3f..7646f2cef5d0 100644 --- a/arch/sparc/include/asm/atomic_32.h +++ b/arch/sparc/include/asm/atomic_32.h | |||
@@ -52,7 +52,6 @@ extern void atomic_set(atomic_t *, int); | |||
52 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) | 52 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) |
53 | #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) | 53 | #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) |
54 | 54 | ||
55 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
56 | 55 | ||
57 | /* This is the old 24-bit implementation. It's still used internally | 56 | /* This is the old 24-bit implementation. It's still used internally |
58 | * by some sparc-specific code, notably the semaphore implementation. | 57 | * by some sparc-specific code, notably the semaphore implementation. |
diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h index bdb2ff880bdd..337139ef91be 100644 --- a/arch/sparc/include/asm/atomic_64.h +++ b/arch/sparc/include/asm/atomic_64.h | |||
@@ -85,7 +85,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
85 | return c != (u); | 85 | return c != (u); |
86 | } | 86 | } |
87 | 87 | ||
88 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
89 | 88 | ||
90 | #define atomic64_cmpxchg(v, o, n) \ | 89 | #define atomic64_cmpxchg(v, o, n) \ |
91 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) | 90 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) |
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h index 56bbaadef646..edd3d3cde460 100644 --- a/arch/sparc/include/asm/prom.h +++ b/arch/sparc/include/asm/prom.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/of_pdt.h> | 21 | #include <linux/of_pdt.h> |
22 | #include <linux/proc_fs.h> | 22 | #include <linux/proc_fs.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | 25 | ||
26 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 | 26 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 |
27 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 | 27 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 |
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 093f10843ff2..01c51c704341 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
24 | #include <asm/asi.h> | 24 | #include <asm/asi.h> |
25 | #include <asm/atomic.h> | 25 | #include <linux/atomic.h> |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Private routines/data | 28 | * Private routines/data |
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h index 20bca8950710..29862a9e9065 100644 --- a/arch/sparc/include/asm/smp_64.h +++ b/arch/sparc/include/asm/smp_64.h | |||
@@ -27,7 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/bitops.h> | 29 | #include <linux/bitops.h> |
30 | #include <asm/atomic.h> | 30 | #include <linux/atomic.h> |
31 | #include <asm/percpu.h> | 31 | #include <asm/percpu.h> |
32 | 32 | ||
33 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 33 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 4e78862d12fd..0dd8422a469c 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
28 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
32 | #include <asm/io.h> | 32 | #include <asm/io.h> |
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index fe8fb44c609c..1210fde18740 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <asm/tlbflush.h> | 28 | #include <asm/tlbflush.h> |
29 | 29 | ||
30 | #include <asm/ptrace.h> | 30 | #include <asm/ptrace.h> |
31 | #include <asm/atomic.h> | 31 | #include <linux/atomic.h> |
32 | #include <asm/irq_regs.h> | 32 | #include <asm/irq_regs.h> |
33 | #include <asm/traps.h> | 33 | #include <asm/traps.h> |
34 | 34 | ||
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 62a034318b18..171e8d84dc3f 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/stacktrace.h> | 22 | #include <asm/stacktrace.h> |
23 | #include <asm/cpudata.h> | 23 | #include <asm/cpudata.h> |
24 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
25 | #include <asm/atomic.h> | 25 | #include <linux/atomic.h> |
26 | #include <asm/nmi.h> | 26 | #include <asm/nmi.h> |
27 | #include <asm/pcr.h> | 27 | #include <asm/pcr.h> |
28 | 28 | ||
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c index 21b125341bf7..f671e7fd6ddc 100644 --- a/arch/sparc/kernel/smp_32.c +++ b/arch/sparc/kernel/smp_32.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | 23 | ||
24 | #include <asm/ptrace.h> | 24 | #include <asm/ptrace.h> |
25 | #include <asm/atomic.h> | 25 | #include <linux/atomic.h> |
26 | 26 | ||
27 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 99cb17251bb5..4a442c32e117 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include <asm/head.h> | 29 | #include <asm/head.h> |
30 | #include <asm/ptrace.h> | 30 | #include <asm/ptrace.h> |
31 | #include <asm/atomic.h> | 31 | #include <linux/atomic.h> |
32 | #include <asm/tlbflush.h> | 32 | #include <asm/tlbflush.h> |
33 | #include <asm/mmu_context.h> | 33 | #include <asm/mmu_context.h> |
34 | #include <asm/cpudata.h> | 34 | #include <asm/cpudata.h> |
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index d3c7a12ad879..1a371f8ae0b0 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Based on asm-parisc/atomic.h Copyright (C) 2000 Philipp Rumpf | 7 | * Based on asm-parisc/atomic.h Copyright (C) 2000 Philipp Rumpf |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <asm/atomic.h> | 10 | #include <linux/atomic.h> |
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | 13 | ||
diff --git a/arch/tile/include/asm/atomic.h b/arch/tile/include/asm/atomic.h index 739cfe0499d1..e3272715c3cb 100644 --- a/arch/tile/include/asm/atomic.h +++ b/arch/tile/include/asm/atomic.h | |||
@@ -121,15 +121,6 @@ static inline int atomic_read(const atomic_t *v) | |||
121 | */ | 121 | */ |
122 | #define atomic_add_negative(i, v) (atomic_add_return((i), (v)) < 0) | 122 | #define atomic_add_negative(i, v) (atomic_add_return((i), (v)) < 0) |
123 | 123 | ||
124 | /** | ||
125 | * atomic_inc_not_zero - increment unless the number is zero | ||
126 | * @v: pointer of type atomic_t | ||
127 | * | ||
128 | * Atomically increments @v by 1, so long as @v is non-zero. | ||
129 | * Returns non-zero if @v was non-zero, and zero otherwise. | ||
130 | */ | ||
131 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
132 | |||
133 | /* Nonexistent functions intended to cause link errors. */ | 124 | /* Nonexistent functions intended to cause link errors. */ |
134 | extern unsigned long __xchg_called_with_bad_pointer(void); | 125 | extern unsigned long __xchg_called_with_bad_pointer(void); |
135 | extern unsigned long __cmpxchg_called_with_bad_pointer(void); | 126 | extern unsigned long __cmpxchg_called_with_bad_pointer(void); |
diff --git a/arch/tile/include/asm/atomic_32.h b/arch/tile/include/asm/atomic_32.h index 92a8bee32311..246feed4794d 100644 --- a/arch/tile/include/asm/atomic_32.h +++ b/arch/tile/include/asm/atomic_32.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * NON INFRINGEMENT. See the GNU General Public License for | 11 | * NON INFRINGEMENT. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | * | 13 | * |
14 | * Do not include directly; use <asm/atomic.h>. | 14 | * Do not include directly; use <linux/atomic.h>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _ASM_TILE_ATOMIC_32_H | 17 | #ifndef _ASM_TILE_ATOMIC_32_H |
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLY__ |
23 | 23 | ||
24 | /* Tile-specific routines to support <asm/atomic.h>. */ | 24 | /* Tile-specific routines to support <linux/atomic.h>. */ |
25 | int _atomic_xchg(atomic_t *v, int n); | 25 | int _atomic_xchg(atomic_t *v, int n); |
26 | int _atomic_xchg_add(atomic_t *v, int i); | 26 | int _atomic_xchg_add(atomic_t *v, int i); |
27 | int _atomic_xchg_add_unless(atomic_t *v, int a, int u); | 27 | int _atomic_xchg_add_unless(atomic_t *v, int a, int u); |
diff --git a/arch/tile/include/asm/atomic_64.h b/arch/tile/include/asm/atomic_64.h index 1c1e60d8ccb6..a48dda30cbcc 100644 --- a/arch/tile/include/asm/atomic_64.h +++ b/arch/tile/include/asm/atomic_64.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * NON INFRINGEMENT. See the GNU General Public License for | 11 | * NON INFRINGEMENT. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | * | 13 | * |
14 | * Do not include directly; use <asm/atomic.h>. | 14 | * Do not include directly; use <linux/atomic.h>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _ASM_TILE_ATOMIC_64_H | 17 | #ifndef _ASM_TILE_ATOMIC_64_H |
diff --git a/arch/tile/include/asm/bitops_32.h b/arch/tile/include/asm/bitops_32.h index d31ab905cfa7..571b118bfd9b 100644 --- a/arch/tile/include/asm/bitops_32.h +++ b/arch/tile/include/asm/bitops_32.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define _ASM_TILE_BITOPS_32_H | 16 | #define _ASM_TILE_BITOPS_32_H |
17 | 17 | ||
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #include <asm/system.h> | 20 | #include <asm/system.h> |
21 | 21 | ||
22 | /* Tile-specific routines to support <asm/bitops.h>. */ | 22 | /* Tile-specific routines to support <asm/bitops.h>. */ |
diff --git a/arch/tile/include/asm/bitops_64.h b/arch/tile/include/asm/bitops_64.h index 68f8c5bc0679..e9c8e381ee0e 100644 --- a/arch/tile/include/asm/bitops_64.h +++ b/arch/tile/include/asm/bitops_64.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define _ASM_TILE_BITOPS_64_H | 16 | #define _ASM_TILE_BITOPS_64_H |
17 | 17 | ||
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #include <asm/system.h> | 20 | #include <asm/system.h> |
21 | 21 | ||
22 | /* See <asm/bitops.h> for API comments. */ | 22 | /* See <asm/bitops.h> for API comments. */ |
diff --git a/arch/tile/include/asm/spinlock_32.h b/arch/tile/include/asm/spinlock_32.h index a8f2c6e31a87..a5e4208d34f9 100644 --- a/arch/tile/include/asm/spinlock_32.h +++ b/arch/tile/include/asm/spinlock_32.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #ifndef _ASM_TILE_SPINLOCK_32_H | 17 | #ifndef _ASM_TILE_SPINLOCK_32_H |
18 | #define _ASM_TILE_SPINLOCK_32_H | 18 | #define _ASM_TILE_SPINLOCK_32_H |
19 | 19 | ||
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <asm/page.h> | 21 | #include <asm/page.h> |
22 | #include <asm/system.h> | 22 | #include <asm/system.h> |
23 | #include <linux/compiler.h> | 23 | #include <linux/compiler.h> |
diff --git a/arch/tile/kernel/intvec_32.S b/arch/tile/kernel/intvec_32.S index 72ade79b621b..fc94607f0bd5 100644 --- a/arch/tile/kernel/intvec_32.S +++ b/arch/tile/kernel/intvec_32.S | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
22 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
23 | #include <asm/irqflags.h> | 23 | #include <asm/irqflags.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
26 | #include <hv/hypervisor.h> | 26 | #include <hv/hypervisor.h> |
27 | #include <arch/abi.h> | 27 | #include <arch/abi.h> |
diff --git a/arch/tile/lib/atomic_32.c b/arch/tile/lib/atomic_32.c index 46570211df52..771b251b409d 100644 --- a/arch/tile/lib/atomic_32.c +++ b/arch/tile/lib/atomic_32.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <asm/futex.h> | 21 | #include <asm/futex.h> |
22 | #include <arch/chip.h> | 22 | #include <arch/chip.h> |
23 | 23 | ||
diff --git a/arch/tile/lib/atomic_asm_32.S b/arch/tile/lib/atomic_asm_32.S index 24448734f6f1..1f75a2a56101 100644 --- a/arch/tile/lib/atomic_asm_32.S +++ b/arch/tile/lib/atomic_asm_32.S | |||
@@ -70,7 +70,7 @@ | |||
70 | */ | 70 | */ |
71 | 71 | ||
72 | #include <linux/linkage.h> | 72 | #include <linux/linkage.h> |
73 | #include <asm/atomic.h> | 73 | #include <linux/atomic.h> |
74 | #include <asm/page.h> | 74 | #include <asm/page.h> |
75 | #include <asm/processor.h> | 75 | #include <asm/processor.h> |
76 | 76 | ||
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index 5852519b2d0f..f6f5c53dc903 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <asm/mman.h> | 43 | #include <asm/mman.h> |
44 | #include <asm/types.h> | 44 | #include <asm/types.h> |
45 | #include <asm/uaccess.h> | 45 | #include <asm/uaccess.h> |
46 | #include <asm/atomic.h> | 46 | #include <linux/atomic.h> |
47 | #include <asm/vgtod.h> | 47 | #include <asm/vgtod.h> |
48 | #include <asm/sys_ia32.h> | 48 | #include <asm/sys_ia32.h> |
49 | 49 | ||
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 4a0b7c7e2cce..7b3ca8324b69 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <asm/cpufeature.h> | 8 | #include <asm/cpufeature.h> |
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/apicdef.h> | 10 | #include <asm/apicdef.h> |
11 | #include <asm/atomic.h> | 11 | #include <linux/atomic.h> |
12 | #include <asm/fixmap.h> | 12 | #include <asm/fixmap.h> |
13 | #include <asm/mpspec.h> | 13 | #include <asm/mpspec.h> |
14 | #include <asm/system.h> | 14 | #include <asm/system.h> |
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index 952a826ac4e5..897969bdd4e6 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h | |||
@@ -244,7 +244,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
244 | return c != (u); | 244 | return c != (u); |
245 | } | 245 | } |
246 | 246 | ||
247 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
248 | 247 | ||
249 | /* | 248 | /* |
250 | * atomic_dec_if_positive - decrement by 1 if old value positive | 249 | * atomic_dec_if_positive - decrement by 1 if old value positive |
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index 13f5504c76c0..09199052060f 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/profile.h> | 21 | #include <linux/profile.h> |
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | 23 | ||
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
27 | 27 | ||
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h index 2e9972468a5d..9cdae5d47e8f 100644 --- a/arch/x86/include/asm/local.h +++ b/arch/x86/include/asm/local.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | 5 | ||
6 | #include <asm/system.h> | 6 | #include <asm/system.h> |
7 | #include <asm/atomic.h> | 7 | #include <linux/atomic.h> |
8 | #include <asm/asm.h> | 8 | #include <asm/asm.h> |
9 | 9 | ||
10 | typedef struct { | 10 | typedef struct { |
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 716b48af7863..c9321f34e55b 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -124,7 +124,7 @@ extern struct atomic_notifier_head x86_mce_decoder_chain; | |||
124 | 124 | ||
125 | #include <linux/percpu.h> | 125 | #include <linux/percpu.h> |
126 | #include <linux/init.h> | 126 | #include <linux/init.h> |
127 | #include <asm/atomic.h> | 127 | #include <linux/atomic.h> |
128 | 128 | ||
129 | extern int mce_disabled; | 129 | extern int mce_disabled; |
130 | extern int mce_p5_enabled; | 130 | extern int mce_p5_enabled; |
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index 8b5393ec1080..69021528b43c 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_X86_MMU_CONTEXT_H | 2 | #define _ASM_X86_MMU_CONTEXT_H |
3 | 3 | ||
4 | #include <asm/desc.h> | 4 | #include <asm/desc.h> |
5 | #include <asm/atomic.h> | 5 | #include <linux/atomic.h> |
6 | #include <asm/pgalloc.h> | 6 | #include <asm/pgalloc.h> |
7 | #include <asm/tlbflush.h> | 7 | #include <asm/tlbflush.h> |
8 | #include <asm/paravirt.h> | 8 | #include <asm/paravirt.h> |
diff --git a/arch/x86/include/asm/prom.h b/arch/x86/include/asm/prom.h index df1287019e6d..644dd885f05a 100644 --- a/arch/x86/include/asm/prom.h +++ b/arch/x86/include/asm/prom.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | 20 | ||
21 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
22 | #include <asm/atomic.h> | 22 | #include <linux/atomic.h> |
23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include <asm/irq_controller.h> | 24 | #include <asm/irq_controller.h> |
25 | 25 | ||
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index e9e51f710e6c..ee67edf86fdd 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ASM_X86_SPINLOCK_H | 1 | #ifndef _ASM_X86_SPINLOCK_H |
2 | #define _ASM_X86_SPINLOCK_H | 2 | #define _ASM_X86_SPINLOCK_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <linux/atomic.h> |
5 | #include <asm/page.h> | 5 | #include <asm/page.h> |
6 | #include <asm/processor.h> | 6 | #include <asm/processor.h> |
7 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 1f2e61e28981..a1fe5c127b52 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -21,7 +21,7 @@ struct task_struct; | |||
21 | struct exec_domain; | 21 | struct exec_domain; |
22 | #include <asm/processor.h> | 22 | #include <asm/processor.h> |
23 | #include <asm/ftrace.h> | 23 | #include <asm/ftrace.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | 25 | ||
26 | struct thread_info { | 26 | struct thread_info { |
27 | struct task_struct *task; /* main task structure */ | 27 | struct task_struct *task; /* main task structure */ |
diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c index b117efd24f71..8a439d364b94 100644 --- a/arch/x86/kernel/amd_gart_64.c +++ b/arch/x86/kernel/amd_gart_64.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/syscore_ops.h> | 30 | #include <linux/syscore_ops.h> |
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
33 | #include <asm/atomic.h> | 33 | #include <linux/atomic.h> |
34 | #include <asm/mtrr.h> | 34 | #include <asm/mtrr.h> |
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/proto.h> | 36 | #include <asm/proto.h> |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index b24be38c8cf8..52fa56399a50 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <asm/perf_event.h> | 38 | #include <asm/perf_event.h> |
39 | #include <asm/x86_init.h> | 39 | #include <asm/x86_init.h> |
40 | #include <asm/pgalloc.h> | 40 | #include <asm/pgalloc.h> |
41 | #include <asm/atomic.h> | 41 | #include <linux/atomic.h> |
42 | #include <asm/mpspec.h> | 42 | #include <asm/mpspec.h> |
43 | #include <asm/i8259.h> | 43 | #include <asm/i8259.h> |
44 | #include <asm/proto.h> | 44 | #include <asm/proto.h> |
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c index 9536b3fe43f8..5d513bc47b6b 100644 --- a/arch/x86/kernel/apic/es7000_32.c +++ b/arch/x86/kernel/apic/es7000_32.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include <linux/io.h> | 48 | #include <linux/io.h> |
49 | 49 | ||
50 | #include <asm/apicdef.h> | 50 | #include <asm/apicdef.h> |
51 | #include <asm/atomic.h> | 51 | #include <linux/atomic.h> |
52 | #include <asm/fixmap.h> | 52 | #include <asm/fixmap.h> |
53 | #include <asm/mpspec.h> | 53 | #include <asm/mpspec.h> |
54 | #include <asm/setup.h> | 54 | #include <asm/setup.h> |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 22a073d7fbff..62184390a601 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/topology.h> | 21 | #include <linux/topology.h> |
22 | #include <linux/cpumask.h> | 22 | #include <linux/cpumask.h> |
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | #include <asm/proto.h> | 25 | #include <asm/proto.h> |
26 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
27 | #include <asm/apic.h> | 27 | #include <asm/apic.h> |
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index 65b8f5c2eebf..610485223bdb 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | 16 | ||
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | #include <asm/system.h> | 18 | #include <asm/system.h> |
19 | #include <asm/timer.h> | 19 | #include <asm/timer.h> |
20 | #include <asm/hw_irq.h> | 20 | #include <asm/hw_irq.h> |
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index f09d4bbe2d2d..b3300e6bacef 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | 17 | ||
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/timer.h> | 20 | #include <asm/timer.h> |
21 | #include <asm/hw_irq.h> | 21 | #include <asm/hw_irq.h> |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index fbc097a085ca..9682ec50180c 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <asm/stacktrace.h> | 49 | #include <asm/stacktrace.h> |
50 | #include <asm/processor.h> | 50 | #include <asm/processor.h> |
51 | #include <asm/debugreg.h> | 51 | #include <asm/debugreg.h> |
52 | #include <asm/atomic.h> | 52 | #include <linux/atomic.h> |
53 | #include <asm/system.h> | 53 | #include <asm/system.h> |
54 | #include <asm/traps.h> | 54 | #include <asm/traps.h> |
55 | #include <asm/desc.h> | 55 | #include <asm/desc.h> |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 2b2255b1f04b..57dcbd4308fa 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/page.h> | 33 | #include <asm/page.h> |
34 | #include <asm/current.h> | 34 | #include <asm/current.h> |
35 | #include <asm/apicdef.h> | 35 | #include <asm/apicdef.h> |
36 | #include <asm/atomic.h> | 36 | #include <linux/atomic.h> |
37 | #include "kvm_cache_regs.h" | 37 | #include "kvm_cache_regs.h" |
38 | #include "irq.h" | 38 | #include "irq.h" |
39 | #include "trace.h" | 39 | #include "trace.h" |
diff --git a/arch/x86/kvm/timer.c b/arch/x86/kvm/timer.c index abd86e865be3..ae432ea1cd83 100644 --- a/arch/x86/kvm/timer.c +++ b/arch/x86/kvm/timer.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/kvm_host.h> | 15 | #include <linux/kvm_host.h> |
16 | #include <linux/kvm.h> | 16 | #include <linux/kvm.h> |
17 | #include <linux/hrtimer.h> | 17 | #include <linux/hrtimer.h> |
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include "kvm_timer.h" | 19 | #include "kvm_timer.h" |
20 | 20 | ||
21 | static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer) | 21 | static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer) |
diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c index 540179e8e9fa..042f6826bf57 100644 --- a/arch/x86/lib/atomic64_32.c +++ b/arch/x86/lib/atomic64_32.c | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | #include <asm/processor.h> | 5 | #include <asm/processor.h> |
6 | #include <asm/cmpxchg.h> | 6 | #include <asm/cmpxchg.h> |
7 | #include <asm/atomic.h> | 7 | #include <linux/atomic.h> |
8 | 8 | ||
9 | long long atomic64_read_cx8(long long, const atomic64_t *v); | 9 | long long atomic64_read_cx8(long long, const atomic64_t *v); |
10 | EXPORT_SYMBOL(atomic64_read_cx8); | 10 | EXPORT_SYMBOL(atomic64_read_cx8); |
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c index 3adff7dcc148..67421f38a215 100644 --- a/arch/x86/mm/mmio-mod.c +++ b/arch/x86/mm/mmio-mod.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
35 | #include <linux/mmiotrace.h> | 35 | #include <linux/mmiotrace.h> |
36 | #include <asm/e820.h> /* for ISA_START_ADDRESS */ | 36 | #include <asm/e820.h> /* for ISA_START_ADDRESS */ |
37 | #include <asm/atomic.h> | 37 | #include <linux/atomic.h> |
38 | #include <linux/percpu.h> | 38 | #include <linux/percpu.h> |
39 | #include <linux/cpu.h> | 39 | #include <linux/cpu.h> |
40 | 40 | ||
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h index a96a0619d0b7..7cca2fb18baf 100644 --- a/arch/xtensa/include/asm/atomic.h +++ b/arch/xtensa/include/asm/atomic.h | |||
@@ -248,7 +248,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
248 | return c != (u); | 248 | return c != (u); |
249 | } | 249 | } |
250 | 250 | ||
251 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
252 | 251 | ||
253 | static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) | 252 | static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) |
254 | { | 253 | { |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index e3558b9a58ba..47041e7c088c 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/platform.h> | 40 | #include <asm/platform.h> |
41 | #include <asm/mmu.h> | 41 | #include <asm/mmu.h> |
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | #include <asm/atomic.h> | 43 | #include <linux/atomic.h> |
44 | #include <asm/asm-offsets.h> | 44 | #include <asm/asm-offsets.h> |
45 | #include <asm/regs.h> | 45 | #include <asm/regs.h> |
46 | 46 | ||