Merge branches 'pm-cpuidle' and 'pm-opp'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 15 Feb 2018 11:01:53 +0000 (12:01 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 15 Feb 2018 11:01:53 +0000 (12:01 +0100)
* pm-cpuidle:
  PM: cpuidle: Fix cpuidle_poll_state_init() prototype
  Documentation/ABI: update cpuidle sysfs documentation

* pm-opp:
  opp: cpu: Replace GFP_ATOMIC with GFP_KERNEL in dev_pm_opp_init_cpufreq_table

1  2  3 
include/linux/cpuidle.h

diff --combined include/linux/cpuidle.h
index 871f9e21810c8ebd22c3b1686777bc7c258cf8cf,a6989e02d0a06bf79725cbf0024b16abe4a30c73,871f9e21810c8ebd22c3b1686777bc7c258cf8cf..0b3fc229086ca6cb98d24645c487ab097d6566e5
@@@@ -225,7 -225,7 -225,7 +225,7 @@@@ static inline void cpuidle_coupled_para
   }
   #endif
   
- -#ifdef CONFIG_ARCH_HAS_CPU_RELAX
+ +#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX)
   void cpuidle_poll_state_init(struct cpuidle_driver *drv);
   #else
   static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}
@@@@ -257,30 -257,22 -257,30 +257,30 @@@@ static inline int cpuidle_register_gove
   {return 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;                                       \
 + #define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, is_retention) \
 + ({                                                                   \
 +      int __ret = 0;                                                  \
 +                                                                      \
 +      if (!idx) {                                                     \
 +              cpu_do_idle();                                          \
 +              return idx;                                             \
 +      }                                                               \
 +                                                                      \
 +      if (!is_retention)                                              \
 +              __ret =  cpu_pm_enter();                                \
 +      if (!__ret) {                                                   \
 +              __ret = low_level_idle_enter(idx);                      \
 +              if (!is_retention)                                      \
 +                      cpu_pm_exit();                                  \
 +      }                                                               \
 +                                                                      \
 +      __ret ? -1 : idx;                                               \
   })
   
 + #define CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx)     \
 +      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, 0)
 + 
 + #define CPU_PM_CPU_IDLE_ENTER_RETENTION(low_level_idle_enter, idx)   \
 +      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, 1)
 + 
   #endif /* _LINUX_CPUIDLE_H */