From: Al Stone ahs3@redhat.com
Signed-off-by: Al Stone al.stone@linaro.org --- drivers/acpi/acpi_pad.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 36d993c..bec32e0 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c @@ -31,7 +31,6 @@ #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> #ifdef CONFIG_X86 - /* BOZO: abstract out? */ #include <asm/mwait.h> #endif
@@ -48,10 +47,9 @@ static unsigned char tsc_marked_unstable; static unsigned char lapic_detected_unstable; static unsigned char lapic_marked_unstable;
+#ifdef CONFIG_X86 static void power_saving_mwait_init(void) { -#ifdef CONFIG_X86 - /* BOZO: abstract out? */ unsigned int eax, ebx, ecx, edx; unsigned int highest_cstate = 0; unsigned int highest_subcstate = 0; @@ -77,9 +75,7 @@ static void power_saving_mwait_init(void) } power_saving_mwait_eax = (highest_cstate << MWAIT_SUBSTATE_SIZE) | (highest_subcstate - 1); -#endif
-#if defined(CONFIG_X86) switch (boot_cpu_data.x86_vendor) { case X86_VENDOR_AMD: case X86_VENDOR_INTEL: @@ -97,8 +93,10 @@ static void power_saving_mwait_init(void) tsc_detected_unstable = 1; lapic_detected_unstable = 1; } -#endif } +#else +static void power_saving_mwait_init(void) { return; } +#endif
static unsigned long cpu_weight[NR_CPUS]; static int tsk_in_cpu[NR_CPUS] = {[0 ... NR_CPUS-1] = -1}; @@ -180,7 +178,6 @@ static int power_saving_thread(void *data) while (!need_resched()) { if (tsc_detected_unstable && !tsc_marked_unstable) { #ifdef CONFIG_X86 - /* BOZO: abstract out? */ /* TSC could halt in idle, so notify users */ mark_tsc_unstable("TSC halts in idle"); #endif @@ -203,12 +200,8 @@ static int power_saving_thread(void *data) stop_critical_timings();
#ifdef CONFIG_X86 - /* BOZO: abstract out? */ __monitor((void *)¤t_thread_info()->flags, 0, 0); -#endif smp_mb(); -#ifdef CONFIG_X86 - /* BOZO: abstract out? */ if (!need_resched()) __mwait(power_saving_mwait_eax, 1); #endif