[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <511975BD.60103@kernel.org>
Date: Mon, 11 Feb 2013 17:50:37 -0500
From: Len Brown <lenb@...nel.org>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
CC: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Len Brown <len.brown@...el.com>, Jiri Kosina <jkosina@...e.cz>
Subject: Re: [PATCH 01/16] APM idle: register apm_cpu_idle via cpuidle
On 02/11/2013 04:18 AM, Daniel Lezcano wrote:
> On 02/10/2013 06:58 AM, Len Brown wrote:
>> From: Len Brown <len.brown@...el.com>
>>
>> Update APM to register its local idle routine with cpuidle.
>>
>> This allows us to stop exporting pm_idle to modules on x86.
>>
>> The Kconfig sub-option, APM_CPU_IDLE, now depends on on CPU_IDLE.
>>
>> Compile-tested only.
>>
>> Signed-off-by: Len Brown <len.brown@...el.com>
>> Cc: Jiri Kosina <jkosina@...e.cz>
>> ---
>
>> +static struct cpuidle_device apm_cpuidle_device = {
>> + .state_count = 2,
>> +};
>
> This will make the cpuidle_register_driver to fail because the
> state_count field of the cpuidle_driver is zero, no ?
>
> static struct cpuidle_driver apm_idle_driver = {
> .name = "apm_idle",
> ...
> .states = {
> ...
> },
> .state_count = 2,
> }
yup, good catch.
>> -static void apm_cpu_idle(void)
>> +static int apm_cpu_idle(struct cpuidle_device *dev,
>> + struct cpuidle_driver *drv, int index)
>> {
>> static int use_apm_idle; /* = 0 */
>> static unsigned int last_jiffies; /* = 0 */
...
>> @@ -964,6 +983,7 @@ recalc:
>> apm_do_busy();
>>
>> local_irq_enable();
>
> ^^^^^^^^
>
> As the 'en_core_tk_irqen' flag has been enabled in the driver, the
> caller of this function will call 'local_irq_enable'. We can remove the
> this line no ?
yup, this line is no longer necessary.
v2 on the way -- hoping somebody with an APM box can test it.
thanks,
-Len Brown, Intel Open Source Technology Center
--
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