Skip to content

Commit bee9e84

Browse files
yghannambp3tk0v
authored andcommitted
x86/amd_nb: Restrict init function to AMD-based systems
The code implicitly operates on AMD-based systems by matching on PCI IDs. However, the use of these IDs is going away. Add an explicit CPU vendor check instead of relying on PCI IDs. Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6a5abee commit bee9e84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/kernel/amd_nb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,10 @@ static __init void fix_erratum_688(void)
582582

583583
static __init int init_amd_nbs(void)
584584
{
585+
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
586+
boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
587+
return 0;
588+
585589
amd_cache_northbridges();
586590
amd_cache_gart();
587591

0 commit comments

Comments
 (0)