From 1edaf574060db4794fcc7e81636cfb5653e630fe Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Mon, 27 Apr 2009 09:23:37 +0200 Subject: [PATCH] --- yaml --- r: 145062 b: refs/heads/master c: fbc97e4c5c31ea198f912196b1379d7493362800 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/processor_idle.c | 19 +++++++++---------- trunk/drivers/platform/x86/eeepc-laptop.c | 6 +++--- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 9fafe7ba230e..937b870b9f91 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a0bf284bfedd6dc95bbee7ebf5ccf3b5f753a008 +refs/heads/master: fbc97e4c5c31ea198f912196b1379d7493362800 diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c index e65476fdf40d..f7ca8c55956b 100644 --- a/trunk/drivers/acpi/processor_idle.c +++ b/trunk/drivers/acpi/processor_idle.c @@ -216,7 +216,7 @@ int acpi_processor_resume(struct acpi_device * device) } #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) -static void tsc_check_state(int state) +static int tsc_halts_in_c(int state) { switch (boot_cpu_data.x86_vendor) { case X86_VENDOR_AMD: @@ -226,17 +226,13 @@ static void tsc_check_state(int state) * C/P/S0/S1 states when this bit is set. */ if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) - return; + return 0; /*FALL THROUGH*/ default: - /* TSC could halt in idle, so notify users */ - if (state > ACPI_STATE_C1) - mark_tsc_unstable("TSC halts in idle"); + return state > ACPI_STATE_C1; } } -#else -static void tsc_check_state(int state) { return; } #endif static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) @@ -582,9 +578,14 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) pr->power.timer_broadcast_on_state = INT_MAX; - for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { + for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { struct acpi_processor_cx *cx = &pr->power.states[i]; +#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) + /* TSC could halt in idle, so notify users */ + if (tsc_halts_in_c(cx->type)) + mark_tsc_unstable("TSC halts in idle");; +#endif switch (cx->type) { case ACPI_STATE_C1: cx->valid = 1; @@ -602,8 +603,6 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) acpi_timer_check_state(i, pr, cx); break; } - if (cx->valid) - tsc_check_state(cx->type); if (cx->valid) working++; diff --git a/trunk/drivers/platform/x86/eeepc-laptop.c b/trunk/drivers/platform/x86/eeepc-laptop.c index 6f54fd1757cd..e21f7cd72e4e 100644 --- a/trunk/drivers/platform/x86/eeepc-laptop.c +++ b/trunk/drivers/platform/x86/eeepc-laptop.c @@ -649,6 +649,9 @@ static int eeepc_hotk_add(struct acpi_device *device) if (ACPI_FAILURE(status)) printk(EEEPC_ERR "Error installing notify handler\n"); + eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6"); + eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7"); + if (get_acpi(CM_ASL_WLAN) != -1) { ehotk->eeepc_wlan_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN); @@ -704,9 +707,6 @@ static int eeepc_hotk_add(struct acpi_device *device) goto bluetooth_fail; } - eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6"); - eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7"); - return 0; bluetooth_fail: