diff options
author | Tejun Heo <tj@kernel.org> | 2009-06-24 02:13:45 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-06-24 02:13:45 -0400 |
commit | 204fba4aa303ea4a7bb726a539bf4a5b9e3203d0 (patch) | |
tree | 899707e00035f1ec83077c16a7f559ecbcc36986 /mm | |
parent | fe87f94f341a4b4097285b46f003059b26eb59bf (diff) |
percpu: cleanup percpu array definitions
Currently, the following three different ways to define percpu arrays
are in use.
1. DEFINE_PER_CPU(elem_type[array_len], array_name);
2. DEFINE_PER_CPU(elem_type, array_name[array_len]);
3. DEFINE_PER_CPU(elem_type, array_name)[array_len];
Unify to #1 which correctly separates the roles of the two parameters
and thus allows more flexibility in the way percpu variables are
defined.
[ Impact: cleanup ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: linux-mm@kvack.org
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/quicklist.c | 2 | ||||
-rw-r--r-- | mm/slub.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mm/quicklist.c b/mm/quicklist.c index e66d07d1b4ff..6eedf7e473d1 100644 --- a/mm/quicklist.c +++ b/mm/quicklist.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/quicklist.h> | 20 | #include <linux/quicklist.h> |
21 | 21 | ||
22 | DEFINE_PER_CPU(struct quicklist, quicklist)[CONFIG_NR_QUICK]; | 22 | DEFINE_PER_CPU(struct quicklist [CONFIG_NR_QUICK], quicklist); |
23 | 23 | ||
24 | #define FRACTION_OF_NODE_MEM 16 | 24 | #define FRACTION_OF_NODE_MEM 16 |
25 | 25 | ||
@@ -2086,8 +2086,8 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s) | |||
2086 | */ | 2086 | */ |
2087 | #define NR_KMEM_CACHE_CPU 100 | 2087 | #define NR_KMEM_CACHE_CPU 100 |
2088 | 2088 | ||
2089 | static DEFINE_PER_CPU(struct kmem_cache_cpu, | 2089 | static DEFINE_PER_CPU(struct kmem_cache_cpu [NR_KMEM_CACHE_CPU], |
2090 | kmem_cache_cpu)[NR_KMEM_CACHE_CPU]; | 2090 | kmem_cache_cpu); |
2091 | 2091 | ||
2092 | static DEFINE_PER_CPU(struct kmem_cache_cpu *, kmem_cache_cpu_free); | 2092 | static DEFINE_PER_CPU(struct kmem_cache_cpu *, kmem_cache_cpu_free); |
2093 | static DECLARE_BITMAP(kmem_cach_cpu_free_init_once, CONFIG_NR_CPUS); | 2093 | static DECLARE_BITMAP(kmem_cach_cpu_free_init_once, CONFIG_NR_CPUS); |