linux/drivers/platform/x86/intel/uncore-frequency
Shouye Liu 8d6955ed76
platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug
In certain situations, the sysfs for uncore may not be present when all
CPUs in a package are offlined and then brought back online after boot.

This issue can occur if there is an error in adding the sysfs entry due
to a memory allocation failure. Retrying to bring the CPUs online will
not resolve the issue, as the uncore_cpu_mask is already set for the
package before the failure condition occurs.

This issue does not occur if the failure happens during module
initialization, as the module will fail to load in the event of any
error.

To address this, ensure that the uncore_cpu_mask is not set until the
successful return of uncore_freq_add_entry().

Fixes: dbce412a77 ("platform/x86/intel-uncore-freq: Split common and enumeration part")
Signed-off-by: Shouye Liu <shouyeliu@tencent.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250417032321.75580-1-shouyeliu@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-04-17 14:15:30 +03:00
..
Kconfig platform/x86/intel-uncore-freq: Uncore frequency control via TPMI 2023-05-09 11:54:42 +02:00
Makefile platform/x86/intel-uncore-freq: Uncore frequency control via TPMI 2023-05-09 11:54:42 +02:00
uncore-frequency-common.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
uncore-frequency-common.h platform/x86/intel-uncore-freq: Add efficiency latency control to sysfs interface 2024-09-04 20:17:31 +02:00
uncore-frequency-tpmi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
uncore-frequency.c platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug 2025-04-17 14:15:30 +03:00