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 /arch | |
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 'arch')
-rw-r--r-- | arch/ia64/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/stab.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/smp.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpu_debug.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_counter.c | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index f0c521b0ba4c..94cf78ba28fa 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c | |||
@@ -58,7 +58,7 @@ static struct local_tlb_flush_counts { | |||
58 | unsigned int count; | 58 | unsigned int count; |
59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; | 59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; |
60 | 60 | ||
61 | static DEFINE_PER_CPU(unsigned short, shadow_flush_counts[NR_CPUS]) ____cacheline_aligned; | 61 | static DEFINE_PER_CPU(unsigned short [NR_CPUS], shadow_flush_counts) ____cacheline_aligned; |
62 | 62 | ||
63 | #define IPI_CALL_FUNC 0 | 63 | #define IPI_CALL_FUNC 0 |
64 | #define IPI_CPU_STOP 1 | 64 | #define IPI_CPU_STOP 1 |
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index e456f062f241..ece1bf994499 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -71,7 +71,7 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second); | |||
71 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | 71 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); |
72 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); | 72 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); |
73 | 73 | ||
74 | DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]); | 74 | DEFINE_PER_CPU(short [MAX_COMPACT_NODES], __sn_cnodeid_to_nasid); |
75 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); | 75 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); |
76 | 76 | ||
77 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); | 77 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); |
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 98cd1dc2ae75..6e9b69c99856 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -31,7 +31,7 @@ struct stab_entry { | |||
31 | 31 | ||
32 | #define NR_STAB_CACHE_ENTRIES 8 | 32 | #define NR_STAB_CACHE_ENTRIES 8 |
33 | static DEFINE_PER_CPU(long, stab_cache_ptr); | 33 | static DEFINE_PER_CPU(long, stab_cache_ptr); |
34 | static DEFINE_PER_CPU(long, stab_cache[NR_STAB_CACHE_ENTRIES]); | 34 | static DEFINE_PER_CPU(long [NR_STAB_CACHE_ENTRIES], stab_cache); |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Create a segment table entry for the given esid/vsid pair. | 37 | * Create a segment table entry for the given esid/vsid pair. |
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c index f6e04bcc70ef..51ffde40af2b 100644 --- a/arch/powerpc/platforms/ps3/smp.c +++ b/arch/powerpc/platforms/ps3/smp.c | |||
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define MSG_COUNT 4 | 39 | #define MSG_COUNT 4 |
40 | static DEFINE_PER_CPU(unsigned int, ps3_ipi_virqs[MSG_COUNT]); | 40 | static DEFINE_PER_CPU(unsigned int [MSG_COUNT], ps3_ipi_virqs); |
41 | 41 | ||
42 | static void do_message_pass(int target, int msg) | 42 | static void do_message_pass(int target, int msg) |
43 | { | 43 | { |
diff --git a/arch/x86/kernel/cpu/cpu_debug.c b/arch/x86/kernel/cpu/cpu_debug.c index 6b2a52dd0403..dca325c03999 100644 --- a/arch/x86/kernel/cpu/cpu_debug.c +++ b/arch/x86/kernel/cpu/cpu_debug.c | |||
@@ -30,8 +30,8 @@ | |||
30 | #include <asm/apic.h> | 30 | #include <asm/apic.h> |
31 | #include <asm/desc.h> | 31 | #include <asm/desc.h> |
32 | 32 | ||
33 | static DEFINE_PER_CPU(struct cpu_cpuX_base, cpu_arr[CPU_REG_ALL_BIT]); | 33 | static DEFINE_PER_CPU(struct cpu_cpuX_base [CPU_REG_ALL_BIT], cpu_arr); |
34 | static DEFINE_PER_CPU(struct cpu_private *, priv_arr[MAX_CPU_FILES]); | 34 | static DEFINE_PER_CPU(struct cpu_private * [MAX_CPU_FILES], priv_arr); |
35 | static DEFINE_PER_CPU(int, cpu_priv_count); | 35 | static DEFINE_PER_CPU(int, cpu_priv_count); |
36 | 36 | ||
37 | static DEFINE_MUTEX(cpu_debug_lock); | 37 | static DEFINE_MUTEX(cpu_debug_lock); |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index ddae21620bda..bd2a2fa84628 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -69,7 +69,7 @@ struct threshold_bank { | |||
69 | struct threshold_block *blocks; | 69 | struct threshold_block *blocks; |
70 | cpumask_var_t cpus; | 70 | cpumask_var_t cpus; |
71 | }; | 71 | }; |
72 | static DEFINE_PER_CPU(struct threshold_bank *, threshold_banks[NR_BANKS]); | 72 | static DEFINE_PER_CPU(struct threshold_bank * [NR_BANKS], threshold_banks); |
73 | 73 | ||
74 | #ifdef CONFIG_SMP | 74 | #ifdef CONFIG_SMP |
75 | static unsigned char shared_bank[NR_BANKS] = { | 75 | static unsigned char shared_bank[NR_BANKS] = { |
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 76dfef23f789..4946288d6832 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c | |||
@@ -862,7 +862,7 @@ amd_pmu_disable_counter(struct hw_perf_counter *hwc, int idx) | |||
862 | x86_pmu_disable_counter(hwc, idx); | 862 | x86_pmu_disable_counter(hwc, idx); |
863 | } | 863 | } |
864 | 864 | ||
865 | static DEFINE_PER_CPU(u64, prev_left[X86_PMC_IDX_MAX]); | 865 | static DEFINE_PER_CPU(u64 [X86_PMC_IDX_MAX], prev_left); |
866 | 866 | ||
867 | /* | 867 | /* |
868 | * Set the next IRQ period, based on the hwc->period_left value. | 868 | * Set the next IRQ period, based on the hwc->period_left value. |