]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug
authorShouye Liu <shouyeliu@tencent.com>
Thu, 17 Apr 2025 03:23:21 +0000 (11:23 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 17 Apr 2025 11:15:30 +0000 (14:15 +0300)
commit8d6955ed76e8a47115f2ea1d9c263ee6f505d737
tree946d0e923ee3e5406f63feed9fbd684a203cc95b
parent9f5595d5f03fd4dc640607a71e89a1daa68fd19d
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: dbce412a7733 ("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>
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c