summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-12-24 01:17:21 -0500
committerLen Brown <len.brown@intel.com>2009-12-24 01:17:21 -0500
commitda3df858c88f7bb420f2517ee9aab238da2e6ed7 (patch)
tree49c9e69818d7a7fc59ebda96dc7abf17a0f3b088 /arch/x86/include/asm
parent309ddc53be1766d6ed5411a3dc1782c2040198fa (diff)
parente59897fe443b5b0a71e135ef4020d1937c9f8901 (diff)
downloadblackbird-obmc-linux-da3df858c88f7bb420f2517ee9aab238da2e6ed7.tar.gz
blackbird-obmc-linux-da3df858c88f7bb420f2517ee9aab238da2e6ed7.zip
Merge branch 'pdc' into release
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/acpi.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 60d2b2db0bc5..56f462cf22d2 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -142,6 +142,32 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int 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);
+}
+
+static inline void arch_acpi_set_pdc_bits(u32 *buf)
+{
+ struct cpuinfo_x86 *c = &cpu_data(0);
+
+ buf[2] |= ACPI_PDC_C_CAPABILITY_SMP;
+
+ if (cpu_has(c, X86_FEATURE_EST))
+ buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP;
+
+ if (cpu_has(c, X86_FEATURE_ACPI))
+ buf[2] |= ACPI_PDC_T_FFH;
+
+ /*
+ * If mwait/monitor is unsupported, C2/C3_FFH will be disabled
+ */
+ if (!cpu_has(c, X86_FEATURE_MWAIT))
+ buf[2] &= ~(ACPI_PDC_C_C2C3_FFH);
+}
+
#else /* !CONFIG_ACPI */
#define acpi_lapic 0
OpenPOWER on IntegriCloud