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/sh | |
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/sh')
-rw-r--r-- | arch/sh/include/asm/atomic.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/hw_irq.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/smp.h | 2 | ||||
-rw-r--r-- | arch/sh/kernel/idle.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/traps_64.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/unwinder.c | 2 |
7 files changed, 6 insertions, 7 deletions
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 |