Merge tag 'x86_urgent_for_v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

- Add a new PCI ID which belongs to a new AMD CPU family 0x1a

- Ensure that that last level cache ID is set in all cases, in the AMD
CPU topology parsing code, in order to prevent invalid scheduling
domain CPU masks

* tag 'x86_urgent_for_v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/topology/amd: Ensure that LLC ID is initialized
x86/amd_nb: Add new PCI IDs for AMD family 0x1a

Changed files
+9 -9
arch
x86
include
linux
+1
arch/x86/kernel/amd_nb.c
··· 95 95 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, 96 96 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) }, 97 97 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3) }, 98 + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M70H_DF_F3) }, 98 99 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F3) }, 99 100 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI300_DF_F3) }, 100 101 {}
+7 -9
arch/x86/kernel/cpu/topology_amd.c
··· 119 119 return true; 120 120 } 121 121 122 - static bool parse_fam10h_node_id(struct topo_scan *tscan) 122 + static void parse_fam10h_node_id(struct topo_scan *tscan) 123 123 { 124 124 union { 125 125 struct { ··· 131 131 } nid; 132 132 133 133 if (!boot_cpu_has(X86_FEATURE_NODEID_MSR)) 134 - return false; 134 + return; 135 135 136 136 rdmsrl(MSR_FAM10H_NODE_ID, nid.msr); 137 137 store_node(tscan, nid.nodes_per_pkg + 1, nid.node_id); 138 138 tscan->c->topo.llc_id = nid.node_id; 139 - return true; 140 139 } 141 140 142 141 static void legacy_set_llc(struct topo_scan *tscan) 143 142 { 144 143 unsigned int apicid = tscan->c->topo.initial_apicid; 145 144 146 - /* parse_8000_0008() set everything up except llc_id */ 147 - tscan->c->topo.llc_id = apicid >> tscan->dom_shifts[TOPO_CORE_DOMAIN]; 145 + /* If none of the parsers set LLC ID then use the die ID for it. */ 146 + if (tscan->c->topo.llc_id == BAD_APICID) 147 + tscan->c->topo.llc_id = apicid >> tscan->dom_shifts[TOPO_CORE_DOMAIN]; 148 148 } 149 149 150 150 static void topoext_fixup(struct topo_scan *tscan) ··· 187 187 return; 188 188 189 189 /* Try the NODEID MSR */ 190 - if (parse_fam10h_node_id(tscan)) 191 - return; 192 - 193 - legacy_set_llc(tscan); 190 + parse_fam10h_node_id(tscan); 194 191 } 195 192 196 193 void cpu_parse_topology_amd(struct topo_scan *tscan) ··· 195 198 tscan->amd_nodes_per_pkg = 1; 196 199 topoext_fixup(tscan); 197 200 parse_topology_amd(tscan); 201 + legacy_set_llc(tscan); 198 202 199 203 if (tscan->amd_nodes_per_pkg > 1) 200 204 set_cpu_cap(tscan->c, X86_FEATURE_AMD_DCM);
+1
include/linux/pci_ids.h
··· 580 580 #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb 581 581 #define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3 582 582 #define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb 583 + #define PCI_DEVICE_ID_AMD_1AH_M70H_DF_F3 0x12bb 583 584 #define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3 584 585 #define PCI_DEVICE_ID_AMD_MI300_DF_F3 0x152b 585 586 #define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a