[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111216213618.GB9832@phenom.dumpdata.com>
Date: Fri, 16 Dec 2011 16:36:18 -0500
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To: ke.yu@...el.com, kevin.tian@...el.com,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
lenb@...nel.org, rjw@...k.pl
Cc: xen-devel@...ts.xensource.com, jeremy@...p.org, konrad@...nel.org,
stefan.bader@...onical.com, Ian.Campbell@...rix.com,
mike.mcclurg@...rix.com, liang.tang@...cle.com
Subject: Re: [PATCH 4/8] ACPI: processor: Don't setup cpu idle driver and
handler when we do not want them.
On Wed, Nov 30, 2011 at 12:21:00PM -0500, Konrad Rzeszutek Wilk wrote:
> From: Kevin Tian <kevin.tian@...el.com>
>
> 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?
>
> Signed-off-by: Yu Ke <ke.yu@...el.com>
> Signed-off-by: Tian Kevin <kevin.tian@...el.com>
> Signed-off-by: Tang Liang <liang.tang@...cle.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists