diff options
Diffstat (limited to 'arch/x86/kernel/cpu/intel_cacheinfo.c')
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index c471eb1a389c..483eda96e102 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -159,7 +159,7 @@ struct _cpuid4_info_regs { | |||
159 | unsigned long can_disable; | 159 | unsigned long can_disable; |
160 | }; | 160 | }; |
161 | 161 | ||
162 | #ifdef CONFIG_PCI | 162 | #if defined(CONFIG_PCI) && defined(CONFIG_SYSFS) |
163 | static struct pci_device_id k8_nb_id[] = { | 163 | static struct pci_device_id k8_nb_id[] = { |
164 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) }, | 164 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) }, |
165 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1203) }, | 165 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1203) }, |
@@ -324,15 +324,6 @@ __cpuinit cpuid4_cache_lookup_regs(int index, | |||
324 | return 0; | 324 | return 0; |
325 | } | 325 | } |
326 | 326 | ||
327 | static int | ||
328 | __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf) | ||
329 | { | ||
330 | struct _cpuid4_info_regs *leaf_regs = | ||
331 | (struct _cpuid4_info_regs *)this_leaf; | ||
332 | |||
333 | return cpuid4_cache_lookup_regs(index, leaf_regs); | ||
334 | } | ||
335 | |||
336 | static int __cpuinit find_num_cache_leaves(void) | 327 | static int __cpuinit find_num_cache_leaves(void) |
337 | { | 328 | { |
338 | unsigned int eax, ebx, ecx, edx; | 329 | unsigned int eax, ebx, ecx, edx; |
@@ -508,6 +499,8 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
508 | return l2; | 499 | return l2; |
509 | } | 500 | } |
510 | 501 | ||
502 | #ifdef CONFIG_SYSFS | ||
503 | |||
511 | /* pointer to _cpuid4_info array (for each cache leaf) */ | 504 | /* pointer to _cpuid4_info array (for each cache leaf) */ |
512 | static DEFINE_PER_CPU(struct _cpuid4_info *, cpuid4_info); | 505 | static DEFINE_PER_CPU(struct _cpuid4_info *, cpuid4_info); |
513 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(cpuid4_info, x))[y])) | 506 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(cpuid4_info, x))[y])) |
@@ -571,6 +564,15 @@ static void __cpuinit free_cache_attributes(unsigned int cpu) | |||
571 | per_cpu(cpuid4_info, cpu) = NULL; | 564 | per_cpu(cpuid4_info, cpu) = NULL; |
572 | } | 565 | } |
573 | 566 | ||
567 | static int | ||
568 | __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf) | ||
569 | { | ||
570 | struct _cpuid4_info_regs *leaf_regs = | ||
571 | (struct _cpuid4_info_regs *)this_leaf; | ||
572 | |||
573 | return cpuid4_cache_lookup_regs(index, leaf_regs); | ||
574 | } | ||
575 | |||
574 | static void __cpuinit get_cpu_leaves(void *_retval) | 576 | static void __cpuinit get_cpu_leaves(void *_retval) |
575 | { | 577 | { |
576 | int j, *retval = _retval, cpu = smp_processor_id(); | 578 | int j, *retval = _retval, cpu = smp_processor_id(); |
@@ -612,8 +614,6 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu) | |||
612 | return retval; | 614 | return retval; |
613 | } | 615 | } |
614 | 616 | ||
615 | #ifdef CONFIG_SYSFS | ||
616 | |||
617 | #include <linux/kobject.h> | 617 | #include <linux/kobject.h> |
618 | #include <linux/sysfs.h> | 618 | #include <linux/sysfs.h> |
619 | 619 | ||