diff options
Diffstat (limited to 'arch/i386/kernel/cpu/intel_cacheinfo.c')
-rw-r--r-- | arch/i386/kernel/cpu/intel_cacheinfo.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index 6c37b4fd8ce2..e9f0b928b0a9 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -159,13 +159,13 @@ union l2_cache { | |||
159 | unsigned val; | 159 | unsigned val; |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static unsigned short assocs[] = { | 162 | static const unsigned short assocs[] = { |
163 | [1] = 1, [2] = 2, [4] = 4, [6] = 8, | 163 | [1] = 1, [2] = 2, [4] = 4, [6] = 8, |
164 | [8] = 16, | 164 | [8] = 16, |
165 | [0xf] = 0xffff // ?? | 165 | [0xf] = 0xffff // ?? |
166 | }; | 166 | }; |
167 | static unsigned char levels[] = { 1, 1, 2 }; | 167 | static const unsigned char levels[] = { 1, 1, 2 }; |
168 | static unsigned char types[] = { 1, 2, 3 }; | 168 | static const unsigned char types[] = { 1, 2, 3 }; |
169 | 169 | ||
170 | static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, | 170 | static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, |
171 | union _cpuid4_leaf_ebx *ebx, | 171 | union _cpuid4_leaf_ebx *ebx, |
@@ -261,7 +261,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
261 | unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ | 261 | unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ |
262 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ | 262 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ |
263 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; | 263 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; |
264 | #ifdef CONFIG_SMP | 264 | #ifdef CONFIG_X86_HT |
265 | unsigned int cpu = (c == &boot_cpu_data) ? 0 : (c - cpu_data); | 265 | unsigned int cpu = (c == &boot_cpu_data) ? 0 : (c - cpu_data); |
266 | #endif | 266 | #endif |
267 | 267 | ||
@@ -383,14 +383,14 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
383 | 383 | ||
384 | if (new_l2) { | 384 | if (new_l2) { |
385 | l2 = new_l2; | 385 | l2 = new_l2; |
386 | #ifdef CONFIG_SMP | 386 | #ifdef CONFIG_X86_HT |
387 | cpu_llc_id[cpu] = l2_id; | 387 | cpu_llc_id[cpu] = l2_id; |
388 | #endif | 388 | #endif |
389 | } | 389 | } |
390 | 390 | ||
391 | if (new_l3) { | 391 | if (new_l3) { |
392 | l3 = new_l3; | 392 | l3 = new_l3; |
393 | #ifdef CONFIG_SMP | 393 | #ifdef CONFIG_X86_HT |
394 | cpu_llc_id[cpu] = l3_id; | 394 | cpu_llc_id[cpu] = l3_id; |
395 | #endif | 395 | #endif |
396 | } | 396 | } |
@@ -729,7 +729,7 @@ static void __cpuexit cache_remove_dev(struct sys_device * sys_dev) | |||
729 | return; | 729 | return; |
730 | } | 730 | } |
731 | 731 | ||
732 | static int cacheinfo_cpu_callback(struct notifier_block *nfb, | 732 | static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, |
733 | unsigned long action, void *hcpu) | 733 | unsigned long action, void *hcpu) |
734 | { | 734 | { |
735 | unsigned int cpu = (unsigned long)hcpu; | 735 | unsigned int cpu = (unsigned long)hcpu; |
@@ -747,7 +747,7 @@ static int cacheinfo_cpu_callback(struct notifier_block *nfb, | |||
747 | return NOTIFY_OK; | 747 | return NOTIFY_OK; |
748 | } | 748 | } |
749 | 749 | ||
750 | static struct notifier_block cacheinfo_cpu_notifier = | 750 | static struct notifier_block __cpuinitdata cacheinfo_cpu_notifier = |
751 | { | 751 | { |
752 | .notifier_call = cacheinfo_cpu_callback, | 752 | .notifier_call = cacheinfo_cpu_callback, |
753 | }; | 753 | }; |