[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240206155830.GPZcJXJkOv8NOtIfHi@fat_crate.local>
Date: Tue, 6 Feb 2024 16:58:30 +0100
From: Borislav Petkov <bp@...en8.de>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Tom Lendacky <thomas.lendacky@....com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Huang Rui <ray.huang@....com>, Juergen Gross <jgross@...e.com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Sohil Mehta <sohil.mehta@...el.com>,
K Prateek Nayak <kprateek.nayak@....com>,
Kan Liang <kan.liang@...ux.intel.com>,
Zhang Rui <rui.zhang@...el.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Feng Tang <feng.tang@...el.com>,
Andy Shevchenko <andy@...radead.org>,
Michael Kelley <mhklinux@...look.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: [patch v5 11/19] x86/cpu: Use common topology code for AMD
On Tue, Jan 23, 2024 at 01:53:47PM +0100, Thomas Gleixner wrote:
> --- a/arch/x86/kernel/cpu/mce/inject.c
> +++ b/arch/x86/kernel/cpu/mce/inject.c
> @@ -433,8 +433,7 @@ static u32 get_nbc_for_node(int node_id)
> struct cpuinfo_x86 *c = &boot_cpu_data;
> u32 cores_per_node;
>
> - cores_per_node = (c->x86_max_cores * smp_num_siblings) / amd_get_nodes_per_socket();
> -
> + cores_per_node = (c->x86_max_cores * smp_num_siblings) / topology_amd_nodes_per_pkg();
> return cores_per_node * node_id;
> }
One more hunk depending on what goes in when and in what order, to fix
a build issue from the RAS tree:
ERROR: modpost: "amd_get_nodes_per_socket" [drivers/ras/amd/atl/amd_atl.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 1
make[1]: *** [/mnt/kernel/kernel/2nd/linux/Makefile:1873: modpost] Error 2
make: *** [Makefile:240: __sub-make] Error 2
---
diff --git a/drivers/ras/amd/atl/umc.c b/drivers/ras/amd/atl/umc.c
index 7e310d1dfcfc..283812bd8497 100644
--- a/drivers/ras/amd/atl/umc.c
+++ b/drivers/ras/amd/atl/umc.c
@@ -264,7 +264,7 @@ static u8 get_die_id(struct atl_err *err)
* For CPUs, this is the AMD Node ID modulo the number
* of AMD Nodes per socket.
*/
- return topology_die_id(err->cpu) % amd_get_nodes_per_socket();
+ return topology_die_id(err->cpu) % topology_amd_nodes_per_pkg();
}
#define UMC_CHANNEL_NUM GENMASK(31, 20)
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists