diff options
author | Arun Sharma <asharma@fb.com> | 2011-07-26 19:09:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 19:49:47 -0400 |
commit | 60063497a95e716c9a689af3be2687d261f115b4 (patch) | |
tree | 6ce0d68db76982c53df46aee5f29f944ebf2c320 /arch/arm | |
parent | 148817ba092f9f6edd35bad3c6c6b8e8f90fe2ed (diff) |
atomic: use <linux/atomic.h>
This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>
Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/atomic.h | 1 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-bcmring/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/include/mach/pm.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/s3c2442.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/s3c244x-clock.c | 2 |
11 files changed, 10 insertions, 11 deletions
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> |