aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-06-24 02:13:45 -0400
committerTejun Heo <tj@kernel.org>2009-06-24 02:13:45 -0400
commit204fba4aa303ea4a7bb726a539bf4a5b9e3203d0 (patch)
tree899707e00035f1ec83077c16a7f559ecbcc36986 /mm
parentfe87f94f341a4b4097285b46f003059b26eb59bf (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.c2
-rw-r--r--mm/slub.c4
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
22DEFINE_PER_CPU(struct quicklist, quicklist)[CONFIG_NR_QUICK]; 22DEFINE_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
diff --git a/mm/slub.c b/mm/slub.c
index ce62b770e2fc..23bb79acc4b9 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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
2089static DEFINE_PER_CPU(struct kmem_cache_cpu, 2089static 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
2092static DEFINE_PER_CPU(struct kmem_cache_cpu *, kmem_cache_cpu_free); 2092static DEFINE_PER_CPU(struct kmem_cache_cpu *, kmem_cache_cpu_free);
2093static DECLARE_BITMAP(kmem_cach_cpu_free_init_once, CONFIG_NR_CPUS); 2093static DECLARE_BITMAP(kmem_cach_cpu_free_init_once, CONFIG_NR_CPUS);