Patch "x86/amd_nb: Restrict init function to AMD-based systems" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    x86/amd_nb: Restrict init function to AMD-based systems

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-amd_nb-restrict-init-function-to-amd-based-syste.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 711a69b415cb52565adb9e9cad77744d34d794e5
Author: Yazen Ghannam <yazen.ghannam@xxxxxxx>
Date:   Fri Dec 6 16:11:55 2024 +0000

    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@xxxxxxx>
    Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20241206161210.163701-3-yazen.ghannam@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index 6dabb53f58a44..b6d5fc396f88c 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -537,6 +537,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();
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux