Commit 1d9cb470 authored by Alex Chiang's avatar Alex Chiang Committed by Len Brown

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: default avatarAlex Chiang <achiang@hp.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 78f16996
...@@ -132,6 +132,8 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; ...@@ -132,6 +132,8 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
#endif #endif
static inline bool arch_has_acpi_pdc(void) { return true; }
#define acpi_unlazy_tlb(x) #define acpi_unlazy_tlb(x)
#ifdef CONFIG_ACPI_NUMA #ifdef CONFIG_ACPI_NUMA
......
...@@ -142,6 +142,13 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate) ...@@ -142,6 +142,13 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
return max_cstate; return max_cstate;
} }
static inline bool arch_has_acpi_pdc(void)
{
struct cpuinfo_x86 *c = &cpu_data(0);
return (c->x86_vendor == X86_VENDOR_INTEL ||
c->x86_vendor == X86_VENDOR_CENTAUR);
}
#else /* !CONFIG_ACPI */ #else /* !CONFIG_ACPI */
#define acpi_lapic 0 #define acpi_lapic 0
......
...@@ -79,8 +79,6 @@ void arch_acpi_processor_init_pdc(struct acpi_processor *pr) ...@@ -79,8 +79,6 @@ void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
struct cpuinfo_x86 *c = &cpu_data(pr->id); struct cpuinfo_x86 *c = &cpu_data(pr->id);
pr->pdc = NULL; pr->pdc = NULL;
if (c->x86_vendor == X86_VENDOR_INTEL ||
c->x86_vendor == X86_VENDOR_CENTAUR)
init_intel_pdc(pr, c); init_intel_pdc(pr, c);
return; return;
......
...@@ -69,6 +69,9 @@ static int acpi_processor_eval_pdc(struct acpi_processor *pr) ...@@ -69,6 +69,9 @@ static int acpi_processor_eval_pdc(struct acpi_processor *pr)
void acpi_processor_set_pdc(struct acpi_processor *pr) void acpi_processor_set_pdc(struct acpi_processor *pr)
{ {
if (arch_has_acpi_pdc() == false)
return;
arch_acpi_processor_init_pdc(pr); arch_acpi_processor_init_pdc(pr);
acpi_processor_eval_pdc(pr); acpi_processor_eval_pdc(pr);
arch_acpi_processor_cleanup_pdc(pr); arch_acpi_processor_cleanup_pdc(pr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment