]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
platform/x86: ISST: Fix optimization with use of numa
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 27 Jul 2021 16:50:52 +0000 (09:50 -0700)
committerHans de Goede <hdegoede@redhat.com>
Thu, 12 Aug 2021 07:25:38 +0000 (09:25 +0200)
When numa is used to map CPU to PCI device, the optimized path to read
from cached data is not working and still calls _isst_if_get_pci_dev().

The reason is that when caching the mapping, numa information is not
available as it is read later. So move the assignment of
isst_cpu_info[cpu].numa_node before calling _isst_if_get_pci_dev().

Fixes: aa2ddd242572 ("platform/x86: ISST: Use numa node id for cpu pci dev mapping")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20210727165052.427238-1-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel_speed_select_if/isst_if_common.c

index 6f0cc679c8e5c8e61046ad9227415a56145c27ce..8a4d52a9028d586db6af30bd36bf64b917beb3f1 100644 (file)
@@ -379,6 +379,8 @@ static int isst_if_cpu_online(unsigned int cpu)
        u64 data;
        int ret;
 
+       isst_cpu_info[cpu].numa_node = cpu_to_node(cpu);
+
        ret = rdmsrl_safe(MSR_CPU_BUS_NUMBER, &data);
        if (ret) {
                /* This is not a fatal error on MSR mailbox only I/F */
@@ -397,7 +399,6 @@ static int isst_if_cpu_online(unsigned int cpu)
                return ret;
        }
        isst_cpu_info[cpu].punit_cpu_id = data;
-       isst_cpu_info[cpu].numa_node = cpu_to_node(cpu);
 
        isst_restore_msr_local(cpu);