idle.h 650 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __ASM_IDLE_H
  2. #define __ASM_IDLE_H
  3. #include <linux/cpuidle.h>
  4. #include <linux/linkage.h>
  5. extern void (*cpu_wait)(void);
  6. extern void r4k_wait(void);
  7. extern asmlinkage void __r4k_wait(void);
  8. extern void r4k_wait_irqoff(void);
  9. static inline int using_rollback_handler(void)
  10. {
  11. return cpu_wait == r4k_wait;
  12. }
  13. extern int mips_cpuidle_wait_enter(struct cpuidle_device *dev,
  14. struct cpuidle_driver *drv, int index);
  15. #define MIPS_CPUIDLE_WAIT_STATE {\
  16. .enter = mips_cpuidle_wait_enter,\
  17. .exit_latency = 1,\
  18. .target_residency = 1,\
  19. .power_usage = UINT_MAX,\
  20. .name = "wait",\
  21. .desc = "MIPS wait",\
  22. }
  23. #endif /* __ASM_IDLE_H */