]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ACPI: processor: Don't setup cpu idle handler when we do not want them.
authorKevin Tian <kevin.tian@intel.com>
Wed, 19 Oct 2011 08:47:51 +0000 (16:47 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 13 Dec 2011 17:02:58 +0000 (12:02 -0500)
This patch inhibits processing of the CPU idle handler if it is not
set to the appropiate one. This is needed by the Xen processor driver
which, while still needing processor details, wants to use the default_idle
call (which makes a yield hypercall).

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Tang Liang <liang.tang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/acpi/processor_idle.c

index 431ab11c8c1b6736aec984754c9f6002d3542ad8..bf4e6719968c10327a78c749b4725f66ec9c179f 100644 (file)
@@ -1077,7 +1077,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
        cpuidle_pause_and_lock();
        cpuidle_disable_device(&pr->power.dev);
        acpi_processor_get_power_info(pr);
-       if (pr->flags.power) {
+       if (pr->flags.power && (cpuidle_get_driver() == &acpi_idle_driver)) {
                acpi_processor_setup_cpuidle(pr);
                ret = cpuidle_enable_device(&pr->power.dev);
        }
@@ -1125,7 +1125,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
         * Note that we use previously set idle handler will be used on
         * platforms that only support C1.
         */
-       if (pr->flags.power) {
+       if (pr->flags.power && (cpuidle_get_driver() == &acpi_idle_driver)) {
                acpi_processor_setup_cpuidle(pr);
                if (cpuidle_register_device(&pr->power.dev))
                        return -EIO;