aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/intel/intel_hfi.h
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>2022-01-27 11:34:51 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-02-03 19:50:49 +0100
commit2d74e6319abe278981e79166b6c2d0c3ed39b1ae (patch)
tree477be27e11e8a21b49fb66ac1642b3052886f256 /drivers/thermal/intel/intel_hfi.h
parent1cb19cabeb0e187b6c244d0da73d27f7432c40dc (diff)
downloadlinux-2d74e6319abe278981e79166b6c2d0c3ed39b1ae.tar.gz
thermal: intel: hfi: Handle CPU hotplug events
All CPUs in a package are represented in an HFI table. There exists an HFI table per package. Thus, CPUs in a package need to coordinate to initialize and access the table. Do such coordination during CPU hotplug. Use the first CPU to come online in a package to initialize the HFI instance and the data structure representing it. Other CPUs in the same package need only to register or unregister themselves in that data structure. The HFI depends on both the package-level thermal management and the local APIC thermal local vector. Thus, to ensure that a CPU coming online has an associated HFI instance when the hardware issues an HFI event, enable the HFI only after having enabled the local APIC thermal vector. The thermal throttle driver takes care of the needed package-level initialization. Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/intel/intel_hfi.h')
-rw-r--r--drivers/thermal/intel/intel_hfi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/intel/intel_hfi.h b/drivers/thermal/intel/intel_hfi.h
index 05f748b48a4e..56c6b2d75202 100644
--- a/drivers/thermal/intel/intel_hfi.h
+++ b/drivers/thermal/intel/intel_hfi.h
@@ -4,8 +4,12 @@
#if defined(CONFIG_INTEL_HFI_THERMAL)
void __init intel_hfi_init(void);
+void intel_hfi_online(unsigned int cpu);
+void intel_hfi_offline(unsigned int cpu);
#else
static inline void intel_hfi_init(void) { }
+static inline void intel_hfi_online(unsigned int cpu) { }
+static inline void intel_hfi_offline(unsigned int cpu) { }
#endif /* CONFIG_INTEL_HFI_THERMAL */
#endif /* _INTEL_HFI_H */