[RFC PATCH 1/8] ARM: Add commonly used cpuidle init code
Rob Lee
rob.lee at linaro.org
Thu Dec 8 12:34:34 EST 2011
On 6 December 2011 05:47, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> On Mon, Dec 05, 2011 at 10:38:04PM -0600, Robert Lee wrote:
>
>> +static int arm_enter_idle(struct cpuidle_device *dev,
>> + struct cpuidle_driver *drv, int index)
>> +{
>> + ktime_t time_start, time_end;
>> +
>> + local_irq_disable();
>> + local_fiq_disable();
>
> Apart from the IRQ disables this code isn't really ARM specific at all
> and I bet it'd be useful on a lot of other architectures.
>
I agree and had considered this as well. Can you (or anyone else)
suggest the best/most community friendly method of doing this? If
this code is moved to drivers/idle or drivers/cpuidle, then perhaps
just making empty fiq enable/disable functions would be ok.
>> + time_start = ktime_get();
>
>> + index = mach_cpuidle(dev, drv, index);
>
> Given the number of systems that at least start off with just a call to
> cpu_do_idle() here shouldn't we have a defualt mach_cpu_idle() which
> does that? Currently the code requires the caller to provide one.
>
Good point. I'll add this to v2.
> Please CC me on any iterations, I've got a S3C64xx implementation I'm
> pushing which could probably use this.
Will do Mark. Thanks for your review and comments.
More information about the linux-arm-kernel
mailing list