[PATCH 3/3] ARM: SAMSUNG: Add idle support

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Jan 12 09:47:51 EST 2010


On Tue, Jan 12, 2010 at 02:18:53PM +0000, Ben Dooks wrote:
> So basically i've got to copy the default_idle() and the necessary cpu code
> for each of the cpus that are supported? I'd much rather just do it once
> and have a pointer to the bits that change thanks.

No - default_idle is just:

static void default_idle(void)
{
        if (!need_resched())
                arch_idle();
        local_irq_enable();
}

Rather than indirecting arch_idle(), hook into pm_idle instead, and have:

	if (!need_resched()) {
		your_idle_code_which_may_be_a_call_to_cpu_idle();
	}
	local_irq_enable();

in each of your idle methods instead, completely ignoring arch_idle().



More information about the linux-arm-kernel mailing list