idle.h 727 B

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