idle.c 712 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * arch/arm/mach-gemini/idle.c
  3. */
  4. #include <linux/init.h>
  5. #include <asm/system_misc.h>
  6. #include <asm/proc-fns.h>
  7. static void gemini_idle(void)
  8. {
  9. /*
  10. * Because of broken hardware we have to enable interrupts or the CPU
  11. * will never wakeup... Acctualy it is not very good to enable
  12. * interrupts first since scheduler can miss a tick, but there is
  13. * no other way around this. Platforms that needs it for power saving
  14. * should enable it in init code, since by default it is
  15. * disabled.
  16. */
  17. /* FIXME: Enabling interrupts here is racy! */
  18. local_irq_enable();
  19. cpu_do_idle();
  20. }
  21. static int __init gemini_idle_init(void)
  22. {
  23. arm_pm_idle = gemini_idle;
  24. return 0;
  25. }
  26. arch_initcall(gemini_idle_init);