diff options
| author | David Arcari <[email protected]> | 2025-08-29 11:38:59 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-08-29 13:15:19 +0000 |
| commit | aa28991fd5dc4c01a40caab2bd9af8c5e06f9899 (patch) | |
| tree | 7e92437614335905d18cd5d03b9e2007214f035b | |
| parent | platform/x86: acer-wmi: Stop using ACPI bitmap for platform profile choices (diff) | |
| download | kernel-aa28991fd5dc4c01a40caab2bd9af8c5e06f9899.tar.gz kernel-aa28991fd5dc4c01a40caab2bd9af8c5e06f9899.zip | |
platform/x86/intel: power-domains: Use topology_logical_package_id() for package ID
Currently, tpmi_get_logical_id() calls topology_physical_package_id()
to set the pkg_id of the info structure. Since some VM hosts assign non
contiguous package IDs, topology_physical_package_id() can return a
larger value than topology_max_packages(). This will result in an
invalid reference into tpmi_power_domain_mask[] as that is allocatead
based on topology_max_packages() as the maximum package ID.
Fixes: 17ca2780458c ("platform/x86/intel: TPMI domain id and CPU mapping")
Signed-off-by: David Arcari <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
| -rw-r--r-- | drivers/platform/x86/intel/tpmi_power_domains.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/tpmi_power_domains.c b/drivers/platform/x86/intel/tpmi_power_domains.c index 9d8247bb9cfa..8641353b2e06 100644 --- a/drivers/platform/x86/intel/tpmi_power_domains.c +++ b/drivers/platform/x86/intel/tpmi_power_domains.c @@ -178,7 +178,7 @@ static int tpmi_get_logical_id(unsigned int cpu, struct tpmi_cpu_info *info) info->punit_thread_id = FIELD_GET(LP_ID_MASK, data); info->punit_core_id = FIELD_GET(MODULE_ID_MASK, data); - info->pkg_id = topology_physical_package_id(cpu); + info->pkg_id = topology_logical_package_id(cpu); info->linux_cpu = cpu; return 0; |
