Skip to content

Commit 775a0ec

Browse files
committed
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
2 parents cf87f46 + 5754ace commit 775a0ec

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

arch/x86/kernel/amd_nb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
9595
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) },
9696
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) },
9797
{ 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) },
9899
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F3) },
99100
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI300_DF_F3) },
100101
{}

arch/x86/kernel/cpu/topology_amd.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static bool parse_8000_001e(struct topo_scan *tscan, bool has_0xb)
119119
return true;
120120
}
121121

122-
static bool parse_fam10h_node_id(struct topo_scan *tscan)
122+
static void parse_fam10h_node_id(struct topo_scan *tscan)
123123
{
124124
union {
125125
struct {
@@ -131,20 +131,20 @@ static bool parse_fam10h_node_id(struct topo_scan *tscan)
131131
} nid;
132132

133133
if (!boot_cpu_has(X86_FEATURE_NODEID_MSR))
134-
return false;
134+
return;
135135

136136
rdmsrl(MSR_FAM10H_NODE_ID, nid.msr);
137137
store_node(tscan, nid.nodes_per_pkg + 1, nid.node_id);
138138
tscan->c->topo.llc_id = nid.node_id;
139-
return true;
140139
}
141140

142141
static void legacy_set_llc(struct topo_scan *tscan)
143142
{
144143
unsigned int apicid = tscan->c->topo.initial_apicid;
145144

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];
148148
}
149149

150150
static void topoext_fixup(struct topo_scan *tscan)
@@ -187,17 +187,15 @@ static void parse_topology_amd(struct topo_scan *tscan)
187187
return;
188188

189189
/* 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);
194191
}
195192

196193
void cpu_parse_topology_amd(struct topo_scan *tscan)
197194
{
198195
tscan->amd_nodes_per_pkg = 1;
199196
topoext_fixup(tscan);
200197
parse_topology_amd(tscan);
198+
legacy_set_llc(tscan);
201199

202200
if (tscan->amd_nodes_per_pkg > 1)
203201
set_cpu_cap(tscan->c, X86_FEATURE_AMD_DCM);

include/linux/pci_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@
580580
#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb
581581
#define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3
582582
#define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb
583+
#define PCI_DEVICE_ID_AMD_1AH_M70H_DF_F3 0x12bb
583584
#define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3
584585
#define PCI_DEVICE_ID_AMD_MI300_DF_F3 0x152b
585586
#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a

0 commit comments

Comments
 (0)