offline_states.h 889 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _OFFLINE_STATES_H_
  2. #define _OFFLINE_STATES_H_
  3. /* Cpu offline states go here */
  4. enum cpu_state_vals {
  5. CPU_STATE_OFFLINE,
  6. CPU_STATE_INACTIVE,
  7. CPU_STATE_ONLINE,
  8. CPU_MAX_OFFLINE_STATES
  9. };
  10. #ifdef CONFIG_HOTPLUG_CPU
  11. extern enum cpu_state_vals get_cpu_current_state(int cpu);
  12. extern void set_cpu_current_state(int cpu, enum cpu_state_vals state);
  13. extern void set_preferred_offline_state(int cpu, enum cpu_state_vals state);
  14. extern void set_default_offline_state(int cpu);
  15. #else
  16. static inline enum cpu_state_vals get_cpu_current_state(int cpu)
  17. {
  18. return CPU_STATE_ONLINE;
  19. }
  20. static inline void set_cpu_current_state(int cpu, enum cpu_state_vals state)
  21. {
  22. }
  23. static inline void set_preferred_offline_state(int cpu, enum cpu_state_vals state)
  24. {
  25. }
  26. static inline void set_default_offline_state(int cpu)
  27. {
  28. }
  29. #endif
  30. extern enum cpu_state_vals get_preferred_offline_state(int cpu);
  31. #endif