]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/mce: use early_cpu_to_node() in mce_init()
authorNicholas Piggin <npiggin@gmail.com>
Mon, 11 Jul 2022 03:06:52 +0000 (13:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 27 Jul 2022 11:36:04 +0000 (21:36 +1000)
cpu_to_node() is not yet available (setup_arch() is called before
setup_per_cpu_areas() by start_kernel()).

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220711030653.150950-1-npiggin@gmail.com
arch/powerpc/kernel/mce.c

index 18173199b79df85a276c98f9f49d8bebed55eff8..6c5d30fba7660eeed2fab06e7beb050ae7f2e316 100644 (file)
@@ -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;