idle.h 689 B

12345678910111213141516171819202122232425262728293031
  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 int mips_cpuidle_wait_enter(struct cpuidle_device *dev,
  15. struct cpuidle_driver *drv, int index);
  16. #define MIPS_CPUIDLE_WAIT_STATE {\
  17. .enter = mips_cpuidle_wait_enter,\
  18. .exit_latency = 1,\
  19. .target_residency = 1,\
  20. .power_usage = UINT_MAX,\
  21. .name = "wait",\
  22. .desc = "MIPS wait",\
  23. }
  24. #endif /* __ASM_IDLE_H */