History

Merge branch 'pm-cpuidle'

* pm-cpuidle: (27 commits) intel_idle: Clean up irtl_2_usec() intel_idle: Move 3 functions closer to their callers intel_idle: Annotate initialization code and data structures intel_idle: Move and clean up intel_idle_cpuidle_devices_uninit() intel_idle: Rearrange intel_idle_cpuidle_driver_init() intel_idle: Clean up NULL pointer check in intel_idle_init() intel_idle: Fold intel_idle_probe() into intel_idle_init() intel_idle: Eliminate __setup_broadcast_timer() cpuidle: fix cpuidle_find_deepest_state() kerneldoc warnings cpuidle: sysfs: fix warnings when compiling with W=1 cpuidle: coupled: fix warnings when compiling with W=1 Documentation: admin-guide: PM: Add intel_idle document cpuidle: arm: Enable compile testing for some of drivers cpuidle: Drop unused cpuidle_driver_ref/unref() functions intel_idle: Use ACPI _CST on server systems intel_idle: Add module parameter to prevent ACPI _CST from being used intel_idle: Allow ACPI _CST to be used for selected known processors cpuidle: Allow idle states to be disabled by default intel_idle: Use ACPI _CST for processor models without C-state tables intel_idle: Refactor intel_idle_cpuidle_driver_init() ...

Rafael J. Wysocki committed 6 years ago

Commit 5b82ba72 parents 3a83c8c 86e946617 files · +836 −382Browse files

Showing the changes to include/linux (2 of 17 files). Show all

Unified · Split

2 files
  1. include/linux/acpi.h +15 −0
  2. include/linux/cpuidle.h +1 −5
include/linux/acpi.h+15−0
@@ -279,6 +279,21 @@ static inline bool invalid_phys_cpuid(phys_cpuid_t phys_id) · 278 unmodified lines
279279
280280 /* Validate the processor object's proc_id */
281281 bool acpi_duplicate_processor_id(int proc_id);
282+/* Processor _CTS control */
283+struct acpi_processor_power;
284+
285+#ifdef CONFIG_ACPI_PROCESSOR_CSTATE
286+bool acpi_processor_claim_cst_control(void);
287+int acpi_processor_evaluate_cst(acpi_handle handle, u32 cpu,
288+ struct acpi_processor_power *info);
289+#else
290+static inline bool acpi_processor_claim_cst_control(void) { return false; }
291+static inline int acpi_processor_evaluate_cst(acpi_handle handle, u32 cpu,
292+ struct acpi_processor_power *info)
293+{
294+ return -ENODEV;
295+}
296+#endif
282297
283298 #ifdef CONFIG_ACPI_HOTPLUG_CPU
284299 /* Arch dependent functions for cpu hotplug support */
include/linux/cpuidle.h+1−5
@@ -77,6 +77,7 @@ struct cpuidle_state { · 76 unmodified lines
7777 #define CPUIDLE_FLAG_COUPLED BIT(1) /* state applies to multiple cpus */
7878 #define CPUIDLE_FLAG_TIMER_STOP BIT(2) /* timer is stopped on this state */
7979 #define CPUIDLE_FLAG_UNUSABLE BIT(3) /* avoid using this state */
80+#define CPUIDLE_FLAG_OFF BIT(4) /* disable this state by default */
8081
8182 struct cpuidle_device_kobj;
8283 struct cpuidle_state_kobj;
@@ -115,7 +116,6 @@ DECLARE_PER_CPU(struct cpuidle_device, cpuidle_dev); · 32 unmodified lines
115116 struct cpuidle_driver {
116117 const char *name;
117118 struct module *owner;
118− int refcnt;
119119
120120 /* used by the cpuidle framework to setup the broadcast timer */
121121 unsigned int bctimer:1;
@@ -147,8 +147,6 @@ extern u64 cpuidle_poll_time(struct cpuidle_driver *drv, · 25 unmodified lines
147147
148148 extern int cpuidle_register_driver(struct cpuidle_driver *drv);
149149 extern struct cpuidle_driver *cpuidle_get_driver(void);
150−extern struct cpuidle_driver *cpuidle_driver_ref(void);
151−extern void cpuidle_driver_unref(void);
152150 extern void cpuidle_driver_state_disabled(struct cpuidle_driver *drv, int idx,
153151 bool disable);
154152 extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
@@ -186,8 +184,6 @@ static inline u64 cpuidle_poll_time(struct cpuidle_driver *drv, · 31 unmodified lines
186184 static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
187185 {return -ENODEV; }
188186 static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
189−static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
190−static inline void cpuidle_driver_unref(void) {}
191187 static inline void cpuidle_driver_state_disabled(struct cpuidle_driver *drv,
192188 int idx, bool disable) { }
193189 static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }