diff options
author | Yinghai Lu <yinghai@kernel.org> | 2011-01-21 18:29:44 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-26 02:44:49 -0500 |
commit | b3d7336db553d318e7ec042eb50a70d307013339 (patch) | |
tree | 217f1b64c5624c20acc8db9cb77e1d34b8891ac5 /arch/x86/include/asm/smp.h | |
parent | 6663050edd9c2e8b1e1f55c09459144d84c045f0 (diff) |
x86: Move llc_shared_map out of cpu_info
cpu_info is already with per_cpu, We can take llc_shared_map out
of cpu_info, and declare it as per_cpu variable directly.
So later referencing could be simple and directly instead of
diving to find cpu_info at first.
Also could make smp_store_cpu_info() much simple to avoid to do
save and restore trick.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Hans Rosenfeld <hans.rosenfeld@amd.com>
Cc: Alok N Kataria <akataria@vmware.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Hans J. Koch <hjk@linutronix.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <4D3A16E8.5020608@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/smp.h')
-rw-r--r-- | arch/x86/include/asm/smp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 4c2f63c7fc1b..3597825a3112 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
@@ -23,6 +23,8 @@ extern unsigned int num_processors; | |||
23 | 23 | ||
24 | DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map); | 24 | DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map); |
25 | DECLARE_PER_CPU(cpumask_var_t, cpu_core_map); | 25 | DECLARE_PER_CPU(cpumask_var_t, cpu_core_map); |
26 | /* cpus sharing the last level cache: */ | ||
27 | DECLARE_PER_CPU(cpumask_var_t, cpu_llc_shared_map); | ||
26 | DECLARE_PER_CPU(u16, cpu_llc_id); | 28 | DECLARE_PER_CPU(u16, cpu_llc_id); |
27 | DECLARE_PER_CPU(int, cpu_number); | 29 | DECLARE_PER_CPU(int, cpu_number); |
28 | 30 | ||
@@ -36,6 +38,11 @@ static inline struct cpumask *cpu_core_mask(int cpu) | |||
36 | return per_cpu(cpu_core_map, cpu); | 38 | return per_cpu(cpu_core_map, cpu); |
37 | } | 39 | } |
38 | 40 | ||
41 | static inline struct cpumask *cpu_llc_shared_mask(int cpu) | ||
42 | { | ||
43 | return per_cpu(cpu_llc_shared_map, cpu); | ||
44 | } | ||
45 | |||
39 | DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); | 46 | DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); |
40 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); | 47 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); |
41 | 48 | ||