diff options
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r-- | include/linux/cpu.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 0628343928ca..1945aa03a52a 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -27,6 +27,19 @@ struct cpu { struct device dev; }; +struct cpu_pstate_pwr { + unsigned int freq; + uint32_t power; +}; + +struct cpu_pwr_stats { + int cpu; + long temp; + struct cpu_pstate_pwr *ptable; + bool throttling; + int len; +}; + extern int register_cpu(struct cpu *cpu, int num); extern struct device *get_cpu_device(unsigned cpu); extern bool cpu_is_hotpluggable(unsigned cpu); @@ -239,6 +252,7 @@ extern struct bus_type cpu_subsys; extern void cpu_hotplug_begin(void); extern void cpu_hotplug_done(void); extern void get_online_cpus(void); +extern void cpu_hotplug_mutex_held(void); extern void put_online_cpus(void); extern void cpu_hotplug_disable(void); extern void cpu_hotplug_enable(void); @@ -261,6 +275,7 @@ static inline void cpu_hotplug_done(void) {} #define cpu_hotplug_enable() do { } while (0) #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) #define __hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) +#define cpu_hotplug_mutex_held() do { } while (0) /* These aren't inline functions due to a GCC bug. */ #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) #define __register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) @@ -276,6 +291,9 @@ static inline int disable_nonboot_cpus(void) { return 0; } static inline void enable_nonboot_cpus(void) {} #endif /* !CONFIG_PM_SLEEP_SMP */ +struct cpu_pwr_stats *get_cpu_pwr_stats(void); +void trigger_cpu_pwr_stats_calc(void); + enum cpuhp_state { CPUHP_OFFLINE, CPUHP_ONLINE, |