Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313681
b: refs/heads/master
c: 852d8cb
h: refs/heads/master
i:
  313679: 023ef0d
v: v3
  • Loading branch information
Deepthi Dharwar authored and Benjamin Herrenschmidt committed Jul 11, 2012
1 parent 4c8ee3d commit 4f2fe90
Show file tree
Hide file tree
Showing 2 changed files with 19 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: 8bf8385b9c3b7f6aaf892eb3141a5af0bbb2027e
refs/heads/master: 852d8cb1ff7cc26e59a4bbb68e230d133b257098
23 changes: 18 additions & 5 deletions trunk/arch/powerpc/platforms/pseries/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,25 @@ static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n,
struct cpuidle_device *dev =
per_cpu_ptr(pseries_cpuidle_devices, hotcpu);

switch (action & 0xf) {
case CPU_ONLINE:
if (dev && cpuidle_get_driver()) {
cpuidle_disable_device(dev);
if (dev && cpuidle_get_driver()) {
switch (action) {
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
cpuidle_pause_and_lock();
cpuidle_enable_device(dev);
cpuidle_resume_and_unlock();
break;

case CPU_DEAD:
case CPU_DEAD_FROZEN:
cpuidle_pause_and_lock();
cpuidle_disable_device(dev);
cpuidle_resume_and_unlock();
break;

default:
return NOTIFY_DONE;
}
break;
}
return NOTIFY_OK;
}
Expand Down Expand Up @@ -345,6 +357,7 @@ static int __init pseries_processor_idle_init(void)
static void __exit pseries_processor_idle_exit(void)
{

unregister_cpu_notifier(&setup_hotplug_notifier);
pseries_idle_devices_uninit();
cpuidle_unregister_driver(&pseries_idle_driver);

Expand Down

0 comments on commit 4f2fe90

Please sign in to comment.