aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/intel_cacheinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/intel_cacheinfo.c')
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index db6c25aa57..1826395ebe 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -170,15 +170,15 @@ union l3_cache {
170 unsigned val; 170 unsigned val;
171}; 171};
172 172
173static const unsigned short assocs[] = { 173static unsigned short assocs[] __cpuinitdata = {
174 [1] = 1, [2] = 2, [4] = 4, [6] = 8, 174 [1] = 1, [2] = 2, [4] = 4, [6] = 8,
175 [8] = 16, [0xa] = 32, [0xb] = 48, 175 [8] = 16, [0xa] = 32, [0xb] = 48,
176 [0xc] = 64, 176 [0xc] = 64,
177 [0xf] = 0xffff // ?? 177 [0xf] = 0xffff // ??
178}; 178};
179 179
180static const unsigned char levels[] = { 1, 1, 2, 3 }; 180static unsigned char levels[] __cpuinitdata = { 1, 1, 2, 3 };
181static const unsigned char types[] = { 1, 2, 3, 3 }; 181static unsigned char types[] __cpuinitdata = { 1, 2, 3, 3 };
182 182
183static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, 183static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax,
184 union _cpuid4_leaf_ebx *ebx, 184 union _cpuid4_leaf_ebx *ebx,
@@ -493,8 +493,8 @@ static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index)
493 } 493 }
494} 494}
495#else 495#else
496static void __init cache_shared_cpu_map_setup(unsigned int cpu, int index) {} 496static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) {}
497static void __init cache_remove_shared_cpu_map(unsigned int cpu, int index) {} 497static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index) {}
498#endif 498#endif
499 499
500static void free_cache_attributes(unsigned int cpu) 500static void free_cache_attributes(unsigned int cpu)
@@ -794,8 +794,9 @@ static int __cpuinit cache_sysfs_init(void)
794 register_hotcpu_notifier(&cacheinfo_cpu_notifier); 794 register_hotcpu_notifier(&cacheinfo_cpu_notifier);
795 795
796 for_each_online_cpu(i) { 796 for_each_online_cpu(i) {
797 cacheinfo_cpu_callback(&cacheinfo_cpu_notifier, CPU_ONLINE, 797 struct sys_device *sys_dev = get_cpu_sysdev((unsigned int)i);
798 (void *)(long)i); 798
799 cache_add_dev(sys_dev);
799 } 800 }
800 801
801 return 0; 802 return 0;