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 /include/linux | |
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 'include/linux')
50 files changed, 58 insertions, 49 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 7a8db4155281..2dcb72bff4b6 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/uio.h> | 7 | #include <linux/uio.h> |
8 | #include <linux/rcupdate.h> | 8 | #include <linux/rcupdate.h> |
9 | 9 | ||
10 | #include <asm/atomic.h> | 10 | #include <linux/atomic.h> |
11 | 11 | ||
12 | #define AIO_MAXSEGS 4 | 12 | #define AIO_MAXSEGS 4 |
13 | #define AIO_KIOGRP_NR_ATOMIC 8 | 13 | #define AIO_KIOGRP_NR_ATOMIC 8 |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 381f4cec8260..49a83ca900ba 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -220,7 +220,7 @@ struct atm_cirange { | |||
220 | #include <linux/skbuff.h> /* struct sk_buff */ | 220 | #include <linux/skbuff.h> /* struct sk_buff */ |
221 | #include <linux/uio.h> | 221 | #include <linux/uio.h> |
222 | #include <net/sock.h> | 222 | #include <net/sock.h> |
223 | #include <asm/atomic.h> | 223 | #include <linux/atomic.h> |
224 | 224 | ||
225 | #ifdef CONFIG_PROC_FS | 225 | #ifdef CONFIG_PROC_FS |
226 | #include <linux/proc_fs.h> | 226 | #include <linux/proc_fs.h> |
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index bc6615d4132b..66fed6364122 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h | |||
@@ -3,6 +3,15 @@ | |||
3 | #include <asm/atomic.h> | 3 | #include <asm/atomic.h> |
4 | 4 | ||
5 | /** | 5 | /** |
6 | * atomic_inc_not_zero - increment unless the number is zero | ||
7 | * @v: pointer of type atomic_t | ||
8 | * | ||
9 | * Atomically increments @v by 1, so long as @v is non-zero. | ||
10 | * Returns non-zero if @v was non-zero, and zero otherwise. | ||
11 | */ | ||
12 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
13 | |||
14 | /** | ||
6 | * atomic_inc_not_zero_hint - increment if not null | 15 | * atomic_inc_not_zero_hint - increment if not null |
7 | * @v: pointer of type atomic_t | 16 | * @v: pointer of type atomic_t |
8 | * @hint: probable value of the atomic before the increment | 17 | * @hint: probable value of the atomic before the increment |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index a008982e7c08..3b2f9cb82986 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/writeback.h> | 18 | #include <linux/writeback.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | struct page; | 21 | struct page; |
22 | struct device; | 22 | struct device; |
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index 564d997e2168..ac4d9f8b52e9 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/preempt.h> | 5 | #include <linux/preempt.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * bit-based spin_lock() | 9 | * bit-based spin_lock() |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 503c8a6b3079..458f497738a4 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <linux/pagemap.h> | 13 | #include <linux/pagemap.h> |
14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | 16 | ||
17 | #ifdef CONFIG_BLOCK | 17 | #ifdef CONFIG_BLOCK |
18 | 18 | ||
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 645778ad899b..3081c58d696e 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <linux/mutex.h> | 42 | #include <linux/mutex.h> |
43 | #include <linux/err.h> | 43 | #include <linux/err.h> |
44 | 44 | ||
45 | #include <asm/atomic.h> | 45 | #include <linux/atomic.h> |
46 | 46 | ||
47 | #define CONFIGFS_ITEM_NAME_LEN 20 | 47 | #define CONFIGFS_ITEM_NAME_LEN 20 |
48 | 48 | ||
diff --git a/include/linux/connector.h b/include/linux/connector.h index f696bccd48cb..0c69ad825b39 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -75,7 +75,7 @@ struct cn_msg { | |||
75 | 75 | ||
76 | #ifdef __KERNEL__ | 76 | #ifdef __KERNEL__ |
77 | 77 | ||
78 | #include <asm/atomic.h> | 78 | #include <linux/atomic.h> |
79 | 79 | ||
80 | #include <linux/list.h> | 80 | #include <linux/list.h> |
81 | #include <linux/workqueue.h> | 81 | #include <linux/workqueue.h> |
diff --git a/include/linux/cred.h b/include/linux/cred.h index f240f2fa0197..48e82af1159b 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/key.h> | 17 | #include <linux/key.h> |
18 | #include <linux/selinux.h> | 18 | #include <linux/selinux.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | struct user_struct; | 21 | struct user_struct; |
22 | struct cred; | 22 | struct cred; |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index a6a7a1c83f54..e5e468e9133d 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #ifndef _LINUX_CRYPTO_H | 17 | #ifndef _LINUX_CRYPTO_H |
18 | #define _LINUX_CRYPTO_H | 18 | #define _LINUX_CRYPTO_H |
19 | 19 | ||
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 3f22d8d6d8a3..d37d2a793099 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __LINUX_DCACHE_H | 1 | #ifndef __LINUX_DCACHE_H |
2 | #define __LINUX_DCACHE_H | 2 | #define __LINUX_DCACHE_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <linux/atomic.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/rculist.h> | 6 | #include <linux/rculist.h> |
7 | #include <linux/rculist_bl.h> | 7 | #include <linux/rculist_bl.h> |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 2833452ea01c..5033fb88c107 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_DEBUG_LOCKING_H | 2 | #define __LINUX_DEBUG_LOCKING_H |
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <asm/atomic.h> | 5 | #include <linux/atomic.h> |
6 | #include <asm/system.h> | 6 | #include <asm/system.h> |
7 | 7 | ||
8 | struct task_struct; | 8 | struct task_struct; |
diff --git a/include/linux/device.h b/include/linux/device.h index 160d4ddb2499..c20dfbfc49b4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
25 | #include <asm/atomic.h> | 25 | #include <linux/atomic.h> |
26 | #include <asm/device.h> | 26 | #include <asm/device.h> |
27 | 27 | ||
28 | struct device; | 28 | struct device; |
diff --git a/include/linux/edac.h b/include/linux/edac.h index 36c66443bdfd..4a73257b47d0 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #ifndef _LINUX_EDAC_H_ | 12 | #ifndef _LINUX_EDAC_H_ |
13 | #define _LINUX_EDAC_H_ | 13 | #define _LINUX_EDAC_H_ |
14 | 14 | ||
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | 17 | ||
18 | #define EDAC_OPSTATE_INVAL -1 | 18 | #define EDAC_OPSTATE_INVAL -1 |
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h index a842db638380..3ff060ac7810 100644 --- a/include/linux/fault-inject.h +++ b/include/linux/fault-inject.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/debugfs.h> | 7 | #include <linux/debugfs.h> |
8 | #include <asm/atomic.h> | 8 | #include <linux/atomic.h> |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * For explanation of the elements of this struct, see | 11 | * For explanation of the elements of this struct, see |
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index df7e3cf82e97..82163c4b32c9 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | 15 | ||
16 | #include <asm/atomic.h> | 16 | #include <linux/atomic.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * The default fd array needs to be at least BITS_PER_LONG, | 19 | * The default fd array needs to be at least BITS_PER_LONG, |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 9ee3f9fb0b4a..741956fa5bfd 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | /* | 15 | /* |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 5e6f42789afe..84ccf8e04fa6 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/workqueue.h> | 15 | #include <linux/workqueue.h> |
16 | 16 | ||
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | #include <asm/byteorder.h> | 18 | #include <asm/byteorder.h> |
19 | 19 | ||
20 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) | 20 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 69ad89b50489..91d0e0a34ef3 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | 18 | ||
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily | 22 | * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index f6efed0039ed..a103732b7588 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/kref.h> | 17 | #include <linux/kref.h> |
18 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
19 | 19 | ||
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
22 | #include <asm/system.h> | 22 | #include <asm/system.h> |
23 | #include <trace/events/irq.h> | 23 | #include <trace/events/irq.h> |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 83e745f3ead7..66f23dc5e76a 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
@@ -54,7 +54,7 @@ extern void jump_label_apply_nops(struct module *mod); | |||
54 | 54 | ||
55 | #else | 55 | #else |
56 | 56 | ||
57 | #include <asm/atomic.h> | 57 | #include <linux/atomic.h> |
58 | 58 | ||
59 | #define JUMP_LABEL_INIT {ATOMIC_INIT(0)} | 59 | #define JUMP_LABEL_INIT {ATOMIC_INIT(0)} |
60 | 60 | ||
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index aadff7cc2b84..529d9a0c75a5 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifdef CONFIG_KGDB_KDB | 16 | #ifdef CONFIG_KGDB_KDB |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | #define KDB_POLL_FUNC_MAX 5 | 21 | #define KDB_POLL_FUNC_MAX 5 |
22 | extern int kdb_poll_idx; | 22 | extern int kdb_poll_idx; |
diff --git a/include/linux/key.h b/include/linux/key.h index 6ea4eebd3467..183a6af7715d 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
22 | #include <linux/sysctl.h> | 22 | #include <linux/sysctl.h> |
23 | #include <linux/rwsem.h> | 23 | #include <linux/rwsem.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | 25 | ||
26 | #ifdef __KERNEL__ | 26 | #ifdef __KERNEL__ |
27 | 27 | ||
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 10ca03d0a250..fa391835508d 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/linkage.h> | 17 | #include <linux/linkage.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #ifdef CONFIG_HAVE_ARCH_KGDB | 20 | #ifdef CONFIG_HAVE_ARCH_KGDB |
21 | #include <asm/kgdb.h> | 21 | #include <asm/kgdb.h> |
22 | #endif | 22 | #endif |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 9229b64ee3aa..668729cc0fe9 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/kobject_ns.h> | 25 | #include <linux/kobject_ns.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
28 | #include <asm/atomic.h> | 28 | #include <linux/atomic.h> |
29 | 29 | ||
30 | #define UEVENT_HELPER_PATH_LEN 256 | 30 | #define UEVENT_HELPER_PATH_LEN 256 |
31 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ | 31 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 387329e02303..53ef894bfa05 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/completion.h> | 37 | #include <linux/completion.h> |
38 | #include <linux/radix-tree.h> | 38 | #include <linux/radix-tree.h> |
39 | 39 | ||
40 | #include <asm/atomic.h> | 40 | #include <linux/atomic.h> |
41 | 41 | ||
42 | #define MAX_MSIX_P_PORT 17 | 42 | #define MAX_MSIX_P_PORT 17 |
43 | #define MAX_MSIX 64 | 43 | #define MAX_MSIX 64 |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 9872d6ca58ae..8b74e9b1d0ad 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/percpu_counter.h> | 15 | #include <linux/percpu_counter.h> |
16 | 16 | ||
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | 18 | ||
19 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
20 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 0a2d3d620feb..be1ac8d7789b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/nodemask.h> | 16 | #include <linux/nodemask.h> |
17 | #include <linux/pageblock-flags.h> | 17 | #include <linux/pageblock-flags.h> |
18 | #include <generated/bounds.h> | 18 | #include <generated/bounds.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | 21 | ||
22 | /* Free memory management - zoned buddy allocator. */ | 22 | /* Free memory management - zoned buddy allocator. */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 604f122a2326..33fe53d78110 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/nodemask.h> | 14 | #include <linux/nodemask.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/seqlock.h> | 16 | #include <linux/seqlock.h> |
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | 18 | ||
19 | struct super_block; | 19 | struct super_block; |
20 | struct vfsmount; | 20 | struct vfsmount; |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 7f87217e9d1f..9121595a8ebf 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/lockdep.h> | 16 | #include <linux/lockdep.h> |
17 | 17 | ||
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Simple, straightforward mutexes with strict semantics: | 21 | * Simple, straightforward mutexes with strict semantics: |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ea6f4aa479d4..2ed0b6cf11c5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/pm_qos_params.h> | 34 | #include <linux/pm_qos_params.h> |
35 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <asm/atomic.h> | 37 | #include <linux/atomic.h> |
38 | #include <asm/cache.h> | 38 | #include <asm/cache.h> |
39 | #include <asm/byteorder.h> | 39 | #include <asm/byteorder.h> |
40 | 40 | ||
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 87694ca86914..08c444aa0411 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/nfs_xdr.h> | 7 | #include <linux/nfs_xdr.h> |
8 | #include <linux/sunrpc/xprt.h> | 8 | #include <linux/sunrpc/xprt.h> |
9 | 9 | ||
10 | #include <asm/atomic.h> | 10 | #include <linux/atomic.h> |
11 | 11 | ||
12 | struct nfs4_session; | 12 | struct nfs4_session; |
13 | struct nfs_iostats; | 13 | struct nfs_iostats; |
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 7f5cfd3b37dd..49c8727eeb57 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/printk.h> | 20 | #include <linux/printk.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | 22 | ||
23 | /* Each escaped entry is prefixed by ESCAPE_CODE | 23 | /* Each escaped entry is prefixed by ESCAPE_CODE |
24 | * then one of the following codes, then the | 24 | * then one of the following codes, then the |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 4e4203a96312..3a5626df37ce 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <linux/compiler.h> | 49 | #include <linux/compiler.h> |
50 | #include <linux/errno.h> | 50 | #include <linux/errno.h> |
51 | #include <linux/kobject.h> | 51 | #include <linux/kobject.h> |
52 | #include <asm/atomic.h> | 52 | #include <linux/atomic.h> |
53 | #include <linux/device.h> | 53 | #include <linux/device.h> |
54 | #include <linux/io.h> | 54 | #include <linux/io.h> |
55 | #include <linux/irqreturn.h> | 55 | #include <linux/irqreturn.h> |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 3f2711ccf910..245bafdafd5e 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -509,7 +509,7 @@ struct perf_guest_info_callbacks { | |||
509 | #include <linux/cpu.h> | 509 | #include <linux/cpu.h> |
510 | #include <linux/irq_work.h> | 510 | #include <linux/irq_work.h> |
511 | #include <linux/jump_label.h> | 511 | #include <linux/jump_label.h> |
512 | #include <asm/atomic.h> | 512 | #include <linux/atomic.h> |
513 | #include <asm/local.h> | 513 | #include <asm/local.h> |
514 | 514 | ||
515 | #define PERF_MAX_STACK_DEPTH 255 | 515 | #define PERF_MAX_STACK_DEPTH 255 |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 7da5fa845959..ad5186354d92 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/mod_devicetable.h> | 27 | #include <linux/mod_devicetable.h> |
28 | 28 | ||
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | 30 | ||
31 | #define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ | 31 | #define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ |
32 | SUPPORTED_10baseT_Full | \ | 32 | SUPPORTED_10baseT_Full | \ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index e7576cf9e32d..650af6deaf8f 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/magic.h> | 7 | #include <linux/magic.h> |
8 | #include <asm/atomic.h> | 8 | #include <linux/atomic.h> |
9 | 9 | ||
10 | struct net; | 10 | struct net; |
11 | struct completion; | 11 | struct completion; |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 313b7defc088..cb7855699037 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -180,7 +180,7 @@ enum { | |||
180 | #include <linux/dqblk_v1.h> | 180 | #include <linux/dqblk_v1.h> |
181 | #include <linux/dqblk_v2.h> | 181 | #include <linux/dqblk_v2.h> |
182 | 182 | ||
183 | #include <asm/atomic.h> | 183 | #include <linux/atomic.h> |
184 | 184 | ||
185 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ | 185 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ |
186 | typedef long long qsize_t; /* Type in which we store sizes */ | 186 | typedef long long qsize_t; /* Type in which we store sizes */ |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 77950dfa0a9e..6a6741440cb7 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | 16 | ||
17 | #include <asm/system.h> | 17 | #include <asm/system.h> |
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | 19 | ||
20 | struct rw_semaphore; | 20 | struct rw_semaphore; |
21 | 21 | ||
diff --git a/include/linux/sem.h b/include/linux/sem.h index f2961afa2f66..1feb2de2ee57 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -77,7 +77,7 @@ struct seminfo { | |||
77 | #define SEMUSZ 20 /* sizeof struct sem_undo */ | 77 | #define SEMUSZ 20 /* sizeof struct sem_undo */ |
78 | 78 | ||
79 | #ifdef __KERNEL__ | 79 | #ifdef __KERNEL__ |
80 | #include <asm/atomic.h> | 80 | #include <linux/atomic.h> |
81 | #include <linux/rcupdate.h> | 81 | #include <linux/rcupdate.h> |
82 | #include <linux/cache.h> | 82 | #include <linux/cache.h> |
83 | 83 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a24218c9c84b..7b996ed86d5b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/time.h> | 20 | #include <linux/time.h> |
21 | #include <linux/cache.h> | 21 | #include <linux/cache.h> |
22 | 22 | ||
23 | #include <asm/atomic.h> | 23 | #include <linux/atomic.h> |
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/net.h> | 26 | #include <linux/net.h> |
diff --git a/include/linux/sonet.h b/include/linux/sonet.h index 67ad11fcf88b..de8832dd272b 100644 --- a/include/linux/sonet.h +++ b/include/linux/sonet.h | |||
@@ -58,7 +58,7 @@ struct sonet_stats { | |||
58 | 58 | ||
59 | #ifdef __KERNEL__ | 59 | #ifdef __KERNEL__ |
60 | 60 | ||
61 | #include <asm/atomic.h> | 61 | #include <linux/atomic.h> |
62 | 62 | ||
63 | struct k_sonet_stats { | 63 | struct k_sonet_stats { |
64 | #define __HANDLE_ITEM(i) atomic_t i | 64 | #define __HANDLE_ITEM(i) atomic_t i |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 0b22d51258e6..7df6c17b0281 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -384,7 +384,7 @@ static inline void assert_spin_locked(spinlock_t *lock) | |||
384 | * Pull the atomic_t declaration: | 384 | * Pull the atomic_t declaration: |
385 | * (asm-mips/atomic.h needs above definitions) | 385 | * (asm-mips/atomic.h needs above definitions) |
386 | */ | 386 | */ |
387 | #include <asm/atomic.h> | 387 | #include <linux/atomic.h> |
388 | /** | 388 | /** |
389 | * atomic_dec_and_lock - lock on reaching reference count zero | 389 | * atomic_dec_and_lock - lock on reaching reference count zero |
390 | * @atomic: the atomic counter | 390 | * @atomic: the atomic counter |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 8521067ed4f7..febc4dbec2ca 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/sunrpc/msg_prot.h> | 15 | #include <linux/sunrpc/msg_prot.h> |
16 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
17 | 17 | ||
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include <linux/rcupdate.h> | 19 | #include <linux/rcupdate.h> |
20 | 20 | ||
21 | /* size of the nodename buffer */ | 21 | /* size of the nodename buffer */ |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index d1c79a906397..5efd8cef389e 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/kref.h> | 16 | #include <linux/kref.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | 20 | ||
21 | /* | 21 | /* |
diff --git a/include/linux/sunrpc/timer.h b/include/linux/sunrpc/timer.h index a67fd734c73b..697d6e69d61f 100644 --- a/include/linux/sunrpc/timer.h +++ b/include/linux/sunrpc/timer.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifndef _LINUX_SUNRPC_TIMER_H | 9 | #ifndef _LINUX_SUNRPC_TIMER_H |
10 | #define _LINUX_SUNRPC_TIMER_H | 10 | #define _LINUX_SUNRPC_TIMER_H |
11 | 11 | ||
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | 13 | ||
14 | struct rpc_rtt { | 14 | struct rpc_rtt { |
15 | unsigned long timeo; /* default timeout value */ | 15 | unsigned long timeo; /* default timeout value */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 91d5fcc83116..14d62490922e 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/node.h> | 10 | #include <linux/node.h> |
11 | 11 | ||
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
14 | 14 | ||
15 | struct notifier_block; | 15 | struct notifier_block; |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index e2696d76a599..d7d2f2158142 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/lockdep.h> | 18 | #include <linux/lockdep.h> |
19 | #include <linux/kobject_ns.h> | 19 | #include <linux/kobject_ns.h> |
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | 21 | ||
22 | struct kobject; | 22 | struct kobject; |
23 | struct module; | 23 | struct module; |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index bcd942fa611c..65efb92da996 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
8 | #include <linux/vm_event_item.h> | 8 | #include <linux/vm_event_item.h> |
9 | #include <asm/atomic.h> | 9 | #include <linux/atomic.h> |
10 | 10 | ||
11 | extern int sysctl_stat_interval; | 11 | extern int sysctl_stat_interval; |
12 | 12 | ||
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 2be2887c6958..0d556deb497b 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/lockdep.h> | 11 | #include <linux/lockdep.h> |
12 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | 14 | ||
15 | struct workqueue_struct; | 15 | struct workqueue_struct; |
16 | 16 | ||