X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=include%2Flinux%2Fcpuidle.h;h=bb31373c3478bdb0ed97dcf8856d1b81ccdc76e3;hb=220276e09bd1ccf7563b8092f7bd794336420eb1;hp=07b83d32f66c857aeabe1eae476db0c1a9e5fbda;hpb=c3695331f3a326a468bd6a5b6f05b481b399726b;p=mirror_ubuntu-zesty-kernel.git diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 07b83d32f66c..bb31373c3478 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -252,4 +252,22 @@ static inline int cpuidle_register_governor(struct cpuidle_governor *gov) #define CPUIDLE_DRIVER_STATE_START 0 #endif +#define CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx) \ +({ \ + int __ret; \ + \ + if (!idx) { \ + cpu_do_idle(); \ + return idx; \ + } \ + \ + __ret = cpu_pm_enter(); \ + if (!__ret) { \ + __ret = low_level_idle_enter(idx); \ + cpu_pm_exit(); \ + } \ + \ + __ret ? -1 : idx; \ +}) + #endif /* _LINUX_CPUIDLE_H */