https://github.com/torvalds/linux
Raw File
Tip revision: 97da3854c526d3a6ee05c849c96e48d21527606c authored by Linus Torvalds on 20 March 2017, 02:09:39 UTC
Linux 4.11-rc3
Tip revision: 97da385
idle.c
/*
 * arch/arm/mach-gemini/idle.c
 */

#include <linux/init.h>
#include <asm/system_misc.h>
#include <asm/proc-fns.h>

static void gemini_idle(void)
{
	/*
	 * Because of broken hardware we have to enable interrupts or the CPU
	 * will never wakeup... Acctualy it is not very good to enable
	 * interrupts first since scheduler can miss a tick, but there is
	 * no other way around this. Platforms that needs it for power saving
	 * should enable it in init code, since by default it is
	 * disabled.
	 */

	/* FIXME: Enabling interrupts here is racy! */
	local_irq_enable();
	cpu_do_idle();
}

static int __init gemini_idle_init(void)
{
	arm_pm_idle = gemini_idle;
	return 0;
}

arch_initcall(gemini_idle_init);
back to top