Re: [PATCH] ARM: OMAP4: cpuidle: Fix the C-state reporting to cpuidle governor.

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

 



Santosh Shilimkar <santosh.shilimkar@xxxxxx> writes:

> On Wednesday 08 February 2012 04:08 AM, Kevin Hilman wrote:
>> Santosh Shilimkar <santosh.shilimkar@xxxxxx> writes:
>> 
>>> OMAP4 cpuidle driver is reporting the state requested by governor rather than
>>> the actually attempted one.
>>>
>>> This is obviously misleading sysfs and powertop cpuidle statistics.
>>> Fix it so that stats are reported correctly.
>>>
>>> Reported-by: Kevin Hilman <khilman@xxxxxx>
>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
>>> ---
>>>  arch/arm/mach-omap2/cpuidle44xx.c |    1 +
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
>>> index cfdbb86..f128489 100644
>>> --- a/arch/arm/mach-omap2/cpuidle44xx.c
>>> +++ b/arch/arm/mach-omap2/cpuidle44xx.c
>>> @@ -85,6 +85,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
>>>  	cpu1_state = pwrdm_read_pwrst(cpu1_pd);
>>>  	if (cpu1_state != PWRDM_POWER_OFF) {
>>>  		new_state_idx = drv->safe_state_index;
>>> +		index = drv->safe_state_index;
>> 
>> How about just get rid of new_state_idx all together and just update
>> index and use it to index in to the states.
>> 
> Make sense. Updated patch below.
>
> Regards,
> Santosh
>
> From 939dc3eda7895043c03526110e2a6b41e9861146 Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> Date: Sun, 5 Feb 2012 13:18:44 +0530
> Subject: [PATCH 2/2] ARM: OMAP4: cpuidle: Fix the C-state reporting to
> cpuidle governor.
>
> OMAP4 cpuidle driver is reporting the state requested by governor rather
> than
> the actually attempted one.
>
> This is obviously misleading sysfs and powertop cpuidle statistics.
> Fix it so that stats are reported correctly.
>
> While at this, get rid of new_state_idx, update and use
> index in to the states.
>
> Reported-by: Kevin Hilman <khilman@xxxxxx>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>

Perfect.  Thanks. 

Queuing as a fix for v3.3.

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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux