On 11/21/2013 04:58 AM, Graeme Gregory wrote:
On Thu, Nov 21, 2013 at 04:54:27PM +0800, Hanjun Guo wrote:
On 2013-11-18 7:17, al.stone@linaro.org wrote:
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
Processor Aggregator Device is intended to be only x86 used now, so I think let us just keep *no* touch to this file and change the Kconfig for Processor Aggregator Device:
config ACPI_PROCESSOR_AGGREGATOR tristate "Processor Aggregator" depends on ACPI_PROCESSOR
depends on X86 || ARM || ARM64
- depends on X86
when we want to use Processor Aggregator Device for ARM one day (maybe never), then modify the driver at that time, is this make sense to you?
I agree Hanjun.
Ack. Much simpler change. Thanks.
Graeme
Thanks Hanjun
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
#endif/* BOZO: abstract out? */ /* TSC could halt in idle, so notify users */ mark_tsc_unstable("TSC halts in idle");
@@ -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
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi