Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145062
b: refs/heads/master
c: fbc97e4
h: refs/heads/master
v: v3
  • Loading branch information
Alan Jenkins authored and Len Brown committed May 14, 2009
1 parent 2550997 commit 1edaf57
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0bf284bfedd6dc95bbee7ebf5ccf3b5f753a008
refs/heads/master: fbc97e4c5c31ea198f912196b1379d7493362800
19 changes: 9 additions & 10 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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++;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1edaf57

Please sign in to comment.