diff mbox

[resend] cpuidle: ACPI processor idle regression

Message ID 2514002.nHT3FtHL0W@vostro.rjw.lan (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Rafael Wysocki May 30, 2013, 4:35 p.m. UTC
On Thursday, May 30, 2013 04:56:18 PM Rafael J. Wysocki wrote:
> On Thursday, May 30, 2013 03:46:24 PM Daniel Lezcano wrote:
> > 
> > Sorry, a bad copy/paste address for Rafael.
> > 
> > ----
> > 
> > Hi all,
> > 
> > while testing the processor_idle for ACPI, I noticed the states usage is
> > not used for cpuidle in sysfs.
> > 
> > Reproduced on Lenovo x230, with a i7-3520M CPU @ 2.90GHz without the
> > intel_idle driver.
> > 
> > After git-bisecting, the commit where this regression occurs is:
> 
> Reproduced and investigating that.

The appended patch fixes this for me.  Can you please verify?

Rafael


---
 drivers/acpi/acpi_processor.c   |    5 +++++
 drivers/acpi/processor_driver.c |    3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Daniel Lezcano May 30, 2013, 4:56 p.m. UTC | #1
On 05/30/2013 06:35 PM, Rafael J. Wysocki wrote:
> On Thursday, May 30, 2013 04:56:18 PM Rafael J. Wysocki wrote:
>> On Thursday, May 30, 2013 03:46:24 PM Daniel Lezcano wrote:
>>>
>>> Sorry, a bad copy/paste address for Rafael.
>>>
>>> ----
>>>
>>> Hi all,
>>>
>>> while testing the processor_idle for ACPI, I noticed the states usage is
>>> not used for cpuidle in sysfs.
>>>
>>> Reproduced on Lenovo x230, with a i7-3520M CPU @ 2.90GHz without the
>>> intel_idle driver.
>>>
>>> After git-bisecting, the commit where this regression occurs is:
>>
>> Reproduced and investigating that.
> 
> The appended patch fixes this for me.  Can you please verify?

Yes, verified. It fixes the issue for me too.

Thanks !

> ---
>  drivers/acpi/acpi_processor.c   |    5 +++++
>  drivers/acpi/processor_driver.c |    3 ---
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> Index: linux-pm/drivers/acpi/processor_driver.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/processor_driver.c
> +++ linux-pm/drivers/acpi/processor_driver.c
> @@ -78,9 +78,6 @@ static struct device_driver acpi_process
>  	.remove = acpi_processor_stop,
>  };
>  
> -DEFINE_PER_CPU(struct acpi_processor *, processors);
> -EXPORT_PER_CPU_SYMBOL(processors);
> -
>  static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
>  {
>  	struct acpi_device *device = data;
> Index: linux-pm/drivers/acpi/acpi_processor.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/acpi_processor.c
> +++ linux-pm/drivers/acpi/acpi_processor.c
> @@ -29,6 +29,9 @@
>  
>  ACPI_MODULE_NAME("processor");
>  
> +DEFINE_PER_CPU(struct acpi_processor *, processors);
> +EXPORT_PER_CPU_SYMBOL(processors);
> +
>  /* --------------------------------------------------------------------------
>                                  Errata Handling
>     -------------------------------------------------------------------------- */
> @@ -387,6 +390,7 @@ static int __cpuinit acpi_processor_add(
>  	 * checks.
>  	 */
>  	per_cpu(processor_device_array, pr->id) = device;
> +	per_cpu(processors, pr->id) = pr;
>  
>  	dev = get_cpu_device(pr->id);
>  	result = acpi_bind_one(dev, pr->handle);
> @@ -406,6 +410,7 @@ static int __cpuinit acpi_processor_add(
>   err:
>  	free_cpumask_var(pr->throttling.shared_cpu_map);
>  	device->driver_data = NULL;
> +	per_cpu(processors, pr->id) = NULL;
>   err_free_pr:
>  	kfree(pr);
>  	return result;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
diff mbox

Patch

Index: linux-pm/drivers/acpi/processor_driver.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_driver.c
+++ linux-pm/drivers/acpi/processor_driver.c
@@ -78,9 +78,6 @@  static struct device_driver acpi_process
 	.remove = acpi_processor_stop,
 };
 
-DEFINE_PER_CPU(struct acpi_processor *, processors);
-EXPORT_PER_CPU_SYMBOL(processors);
-
 static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
 {
 	struct acpi_device *device = data;
Index: linux-pm/drivers/acpi/acpi_processor.c
===================================================================
--- linux-pm.orig/drivers/acpi/acpi_processor.c
+++ linux-pm/drivers/acpi/acpi_processor.c
@@ -29,6 +29,9 @@ 
 
 ACPI_MODULE_NAME("processor");
 
+DEFINE_PER_CPU(struct acpi_processor *, processors);
+EXPORT_PER_CPU_SYMBOL(processors);
+
 /* --------------------------------------------------------------------------
                                 Errata Handling
    -------------------------------------------------------------------------- */
@@ -387,6 +390,7 @@  static int __cpuinit acpi_processor_add(
 	 * checks.
 	 */
 	per_cpu(processor_device_array, pr->id) = device;
+	per_cpu(processors, pr->id) = pr;
 
 	dev = get_cpu_device(pr->id);
 	result = acpi_bind_one(dev, pr->handle);
@@ -406,6 +410,7 @@  static int __cpuinit acpi_processor_add(
  err:
 	free_cpumask_var(pr->throttling.shared_cpu_map);
 	device->driver_data = NULL;
+	per_cpu(processors, pr->id) = NULL;
  err_free_pr:
 	kfree(pr);
 	return result;