[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/8] ACPI: processor: Don't setup cpu idle driver and handler when we do not want them.



On 2011-12-17 5:36, Konrad Rzeszutek Wilk wrote:
On Wed, Nov 30, 2011 at 12:21:00PM -0500, Konrad Rzeszutek Wilk wrote:
From: Kevin Tian<kevin.tian@xxxxxxxxx>

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).
Which I think is not required anymore with the 
d91ee5863b71e8c90eaf6035bff3078a85e2e7b5
(cpuidle: replace xen access to x86 pm_idle and default_idle) and
62027aea23fcd14478abdddd3b74a4e0f5fb2984
(cpuidle: create bootparam "cpuidle.off=1")

Liang, can you double-check that please?

Hi,Konrad
I just read the code ,I think don't need that code too. I will double check tomorrow.
thanks
liang

Signed-off-by: Yu Ke<ke.yu@xxxxxxxxx>
Signed-off-by: Tian Kevin<kevin.tian@xxxxxxxxx>
Signed-off-by: Tang Liang<liang.tang@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk<konrad.wilk@xxxxxxxxxx>
---
  drivers/acpi/processor_idle.c |    8 +++++---
  1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index d88974a..0ad347f 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1127,7 +1127,7 @@ int acpi_processor_hotplug(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_cx(pr);
                ret = cpuidle_enable_device(&pr->power.dev);
        }
@@ -1183,7 +1183,8 @@ int acpi_processor_cst_has_changed(struct acpi_processor 
*pr)
                        if (!_pr || !_pr->flags.power_setup_done)
                                continue;
                        acpi_processor_get_power_info(_pr);
-                       if (_pr->flags.power) {
+                       if (_pr->flags.power&&  (cpuidle_get_driver()
+                                               ==&acpi_idle_driver)) {
                                acpi_processor_setup_cpuidle_cx(_pr);
                                cpuidle_enable_device(&_pr->power.dev);
                        }
@@ -1237,7 +1238,8 @@ 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&&  (__acpi_processor_register_driver ==
+                               acpi_processor_register_driver)) {
                /* Register acpi_idle_driver if not already registered */
                if (!acpi_processor_registered) {
                        acpi_processor_setup_cpuidle_states(pr);
--
1.7.7.3

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.