diff options
| author | Yazen Ghannam <yazen.ghannam@amd.com> | 2024-12-06 16:11:55 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-17 11:35:55 +0100 |
| commit | b3b726544486bcf63cd66c435d2ed5e9361867b9 (patch) | |
| tree | e96fb7ac6e733c32ebdc6a2f7b43532ac8abaf16 /arch/x86 | |
| parent | b11add87a389107eaf8d574e2e825ad02269f252 (diff) | |
| download | linux-b3b726544486bcf63cd66c435d2ed5e9361867b9.tar.gz linux-b3b726544486bcf63cd66c435d2ed5e9361867b9.tar.bz2 linux-b3b726544486bcf63cd66c435d2ed5e9361867b9.zip | |
x86/amd_nb: Restrict init function to AMD-based systems
[ Upstream commit bee9e840609cc67d0a7d82f22a2130fb7a0a766d ]
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 <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20241206161210.163701-3-yazen.ghannam@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/x86')
| -rw-r--r-- | arch/x86/kernel/amd_nb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 9fe9972d2071..37b8244899d8 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -582,6 +582,10 @@ static __init void fix_erratum_688(void) static __init int init_amd_nbs(void) { + if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD && + boot_cpu_data.x86_vendor != X86_VENDOR_HYGON) + return 0; + amd_cache_northbridges(); amd_cache_gart(); |
