From: Deepthi Dharwar Date: Tue, 3 Jul 2012 20:07:22 +0000 (+0000) Subject: powerpc/cpuidle: Fixes for pseries_idle hotplug notifier X-Git-Tag: v3.6-rc1~132^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=852d8cb1ff7cc26e59a4bbb68e230d133b257098;p=pandora-kernel.git powerpc/cpuidle: Fixes for pseries_idle hotplug notifier Currently the call to pseries_notify_cpuidle_add_cpu(), that takes action on the cpuidle front when a cpu is added/removed is being made from smp_xics_setup_cpu(). This caused lockdep issues as reported https://lkml.org/lkml/2012/5/17/2 On addition of each cpu, resources were cleared and re-allocated each time, all in critical section as part of start_secondary() call were interrupts are disabled. To resolve this issue, the pseries_notify_cpuidle_add_cpu() call is is being replaced by a hotplug notifier which would prevent cpuidle resources from being released and allocated each time cpu is onlined in the critical code path. It was fixed in https://lkml.org/lkml/2012/5/18/174. Also it is essential to call cpuidle_enable/disable_device between cpuidle_pause_and_lock() and cpuidle_resume_and_unlock() when used externally to avoid race conditions. Add support for CPU_ONLINE_FROZEN and CPU_DEAD_FROZEN as part of hotplug notify event for pseries_idle and unregister hotplug notifier while exiting out. The above mentioned issues are fixed as part of this patch. Signed-off-by: Deepthi Dharwar Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed