Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106658
b: refs/heads/master
c: b032bf7
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Linus Torvalds committed Jul 28, 2008
1 parent d256dce commit 40b75bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 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: 9ffc1699e36abd5baee188c8e36b1bb27d0d4278
refs/heads/master: b032bf70df2e43149ce2b4e9a865b076c6140753
15 changes: 11 additions & 4 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,9 +1332,15 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
if (!pr->flags.power_setup_done)
return -ENODEV;

/* Fall back to the default idle loop */
pm_idle = pm_idle_save;
synchronize_sched(); /* Relies on interrupts forcing exit from idle. */
/*
* Fall back to the default idle loop, when pm_idle_save had
* been initialized.
*/
if (pm_idle_save) {
pm_idle = pm_idle_save;
/* Relies on interrupts forcing exit from idle. */
synchronize_sched();
}

pr->flags.power = 0;
result = acpi_processor_get_power_info(pr);
Expand Down Expand Up @@ -1896,7 +1902,8 @@ int acpi_processor_power_exit(struct acpi_processor *pr,

/* Unregister the idle handler when processor #0 is removed. */
if (pr->id == 0) {
pm_idle = pm_idle_save;
if (pm_idle_save)
pm_idle = pm_idle_save;

/*
* We are about to unload the current idle thread pm callback
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/cpuidle/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void cpuidle_install_idle_handler(void)
*/
void cpuidle_uninstall_idle_handler(void)
{
if (enabled_devices && (pm_idle != pm_idle_old)) {
if (enabled_devices && pm_idle_old && (pm_idle != pm_idle_old)) {
pm_idle = pm_idle_old;
cpuidle_kick_cpus();
}
Expand Down

0 comments on commit 40b75bb

Please sign in to comment.