From: Nicholas Piggin Date: Mon, 11 Jul 2022 03:06:52 +0000 (+1000) Subject: powerpc/mce: use early_cpu_to_node() in mce_init() X-Git-Tag: baikal/mips/sdk6.1~5097^2~53 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=83b6f37ce7425631f80fd98e25a6ec506ca5eb60;p=kernel.git powerpc/mce: use early_cpu_to_node() in mce_init() cpu_to_node() is not yet available (setup_arch() is called before setup_per_cpu_areas() by start_kernel()). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220711030653.150950-1-npiggin@gmail.com --- diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c index 18173199b79df..6c5d30fba7660 100644 --- a/arch/powerpc/kernel/mce.c +++ b/arch/powerpc/kernel/mce.c @@ -756,7 +756,7 @@ void __init mce_init(void) mce_info = memblock_alloc_try_nid(sizeof(*mce_info), __alignof__(*mce_info), MEMBLOCK_LOW_LIMIT, - limit, cpu_to_node(i)); + limit, early_cpu_to_node(i)); if (!mce_info) goto err; paca_ptrs[i]->mce_info = mce_info;