thermal: intel: hfi: Enable an HFI instance from its first online CPU
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Wed, 3 Jan 2024 04:14:57 +0000 (20:14 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 3 Jan 2024 13:06:40 +0000 (14:06 +0100)
commitac1f9230d92a04619331c600dbcead0e32b3e80e
tree8e40263b38693cbf81aaf7eb3251d038cc18fa5b
parent8a8b6bb93c704776c4b05cb517c3fa8baffb72f5
thermal: intel: hfi: Enable an HFI instance from its first online CPU

Previously, HFI instances were never disabled once enabled. A CPU in an
instance only had to check during boot whether another CPU had previously
initialized the instance and its corresponding data structure.

A subsequent changeset will add functionality to disable instances
to support hibernation. Such change will also make possible to disable an
HFI instance during runtime via CPU hotplug.

Enable an HFI instance from the first of its CPUs that comes online. This
covers the boot, CPU hotplug, and resume-from-suspend cases. It also covers
systems with one or more HFI instances (i.e., packages).

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/intel_hfi.c