ACPI: intel_idle : break dependency between modules
When the system is booted with some cpus offline, the idle driver is not initialized. When a cpu is set online, the acpi code call the intel idle init function. Unfortunately this code introduce a dependency between intel_idle and acpi. This patch is intended to remove this dependency by using the notifier of intel_idle. This patch has the benefit of encapsulating the intel_idle driver and remove some exported functions. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
此提交包含在:
@@ -427,18 +427,11 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
|
||||
* Initialize missing things
|
||||
*/
|
||||
if (pr->flags.need_hotplug_init) {
|
||||
struct cpuidle_driver *idle_driver =
|
||||
cpuidle_get_driver();
|
||||
|
||||
printk(KERN_INFO "Will online and init hotplugged "
|
||||
"CPU: %d\n", pr->id);
|
||||
WARN(acpi_processor_start(pr), "Failed to start CPU:"
|
||||
" %d\n", pr->id);
|
||||
pr->flags.need_hotplug_init = 0;
|
||||
if (idle_driver && !strcmp(idle_driver->name,
|
||||
"intel_idle")) {
|
||||
intel_idle_cpu_init(pr->id);
|
||||
}
|
||||
/* Normal CPU soft online event */
|
||||
} else {
|
||||
acpi_processor_ppc_has_changed(pr, 0);
|
||||
|
新增問題並參考
封鎖使用者