aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2009-12-20 14:19:14 -0500
committerLen Brown <len.brown@intel.com>2009-12-22 03:24:10 -0500
commit1d9cb470a755409ce97c3376174b1e234bd20371 (patch)
treecc0f35e02fed9b833be7bafda72b4980c4667ec9
parent78f1699659963fff97975df44db6d5dbe7218e55 (diff)
ACPI: processor: introduce arch_has_acpi_pdc
arch dependent helper function that tells us if we should attempt to evaluate _PDC on this machine or not. The x86 implementation assumes that the CPUs in the machine must be homogeneous, and that you cannot mix CPUs of different vendors. Cc: Tony Luck <tony.luck@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--arch/ia64/include/asm/acpi.h2
-rw-r--r--arch/x86/include/asm/acpi.h7
-rw-r--r--arch/x86/kernel/acpi/processor.c4
-rw-r--r--drivers/acpi/processor_pdc.c3
4 files changed, 13 insertions, 3 deletions
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index 91df9686a0da..3b7888294648 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -132,6 +132,8 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
132extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; 132extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
133#endif 133#endif
134 134
135static inline bool arch_has_acpi_pdc(void) { return true; }
136
135#define acpi_unlazy_tlb(x) 137#define acpi_unlazy_tlb(x)
136 138
137#ifdef CONFIG_ACPI_NUMA 139#ifdef CONFIG_ACPI_NUMA
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 60d2b2db0bc5..d787e6e92bd1 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -142,6 +142,13 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
142 return max_cstate; 142 return max_cstate;
143} 143}
144 144
145static inline bool arch_has_acpi_pdc(void)
146{
147 struct cpuinfo_x86 *c = &cpu_data(0);
148 return (c->x86_vendor == X86_VENDOR_INTEL ||
149 c->x86_vendor == X86_VENDOR_CENTAUR);
150}
151
145#else /* !CONFIG_ACPI */ 152#else /* !CONFIG_ACPI */
146 153
147#define acpi_lapic 0 154#define acpi_lapic 0
diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
index d85d1b2432ba..bcb6efe08c5d 100644
--- a/arch/x86/kernel/acpi/processor.c
+++ b/arch/x86/kernel/acpi/processor.c
@@ -79,9 +79,7 @@ void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
79 struct cpuinfo_x86 *c = &cpu_data(pr->id); 79 struct cpuinfo_x86 *c = &cpu_data(pr->id);
80 80
81 pr->pdc = NULL; 81 pr->pdc = NULL;
82 if (c->x86_vendor == X86_VENDOR_INTEL || 82 init_intel_pdc(pr, c);
83 c->x86_vendor == X86_VENDOR_CENTAUR)
84 init_intel_pdc(pr, c);
85 83
86 return; 84 return;
87} 85}
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c
index b416c32dda04..931e735e9e37 100644
--- a/drivers/acpi/processor_pdc.c
+++ b/drivers/acpi/processor_pdc.c
@@ -69,6 +69,9 @@ static int acpi_processor_eval_pdc(struct acpi_processor *pr)
69 69
70void acpi_processor_set_pdc(struct acpi_processor *pr) 70void acpi_processor_set_pdc(struct acpi_processor *pr)
71{ 71{
72 if (arch_has_acpi_pdc() == false)
73 return;
74
72 arch_acpi_processor_init_pdc(pr); 75 arch_acpi_processor_init_pdc(pr);
73 acpi_processor_eval_pdc(pr); 76 acpi_processor_eval_pdc(pr);
74 arch_acpi_processor_cleanup_pdc(pr); 77 arch_acpi_processor_cleanup_pdc(pr);