linux/arch/powerpc
Oscar Salvador 48b63961c8 powerpc/numa: Associate numa node to its cpu earlier
powerpc is the only platform that do not rely on
cpu_up()->try_online_node() to bring up a numa node,
and special cases it, instead, deep in its own machinery:

dlpar_online_cpu
 find_and_online_cpu_nid
  try_online_node

This should not be needed, but the thing is that the try_online_node()
from cpu_up() will not apply on the right node, because cpu_to_node()
will return the old mapping numa<->cpu that gets set on boot stage
for all possible cpus.

That can be seen easily if we try to print out the numa node passed
to try_online_node() in cpu_up().

The thing is that the numa<->cpu mapping does not get updated till a much
later stage in start_secondary:

start_secondary:
 set_numa_node(numa_cpu_lookup_table[cpu])

But we do not really care, as we already now the
CPU <-> NUMA associativity back in find_and_online_cpu_nid(),
so let us make use of that and set the proper numa<->cpu mapping,
so cpu_to_node() in cpu_up() returns the right node and
try_online_node() can do its work.

Signed-off-by: Oscar Salvador <osalvador@suse.de>
Tested-by: Geetika Moolchandani <Geetika.Moolchandani1@ibm.com>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220411074934.4632-1-osalvador@suse.de
2022-05-22 15:58:30 +10:00
..
boot powerpc/85xx/p2020: Add fsl,mpc8548-pmc node 2022-05-22 15:58:28 +10:00
configs arch: Remove references to CONFIG_NFSD_V3 in the default configs 2022-03-11 10:25:16 -05:00
crypto powerpc: fix typos in comments 2022-05-05 22:12:44 +10:00
include powerpc/numa: Associate numa node to its cpu earlier 2022-05-22 15:58:30 +10:00
kernel powerpc: Book3S 64-bit outline-only KASAN support 2022-05-22 15:58:29 +10:00
kexec powerpc/kasan: Disable address sanitization in kexec paths 2022-05-22 15:58:29 +10:00
kvm powerpc: Book3S 64-bit outline-only KASAN support 2022-05-22 15:58:29 +10:00
lib powerpc/kasan: Don't instrument non-maskable or raw interrupts 2022-05-22 15:58:29 +10:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm powerpc/numa: Associate numa node to its cpu earlier 2022-05-22 15:58:30 +10:00
net powerpc/inst: Remove PPC_INST_BL 2022-05-22 15:58:27 +10:00
perf powerpc/perf: Fix the threshold compare group constraint for power9 2022-05-22 15:58:30 +10:00
platforms powerpc/numa: Associate numa node to its cpu earlier 2022-05-22 15:58:30 +10:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev powerpc/85xx: Remove FSL_85XX_CACHE_SRAM 2022-05-22 15:58:30 +10:00
tools powerpc/64: Add UADDR64 relocation support 2022-03-09 21:47:53 +11:00
xmon powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc: Book3S 64-bit outline-only KASAN support 2022-05-22 15:58:29 +10:00
Kconfig.debug powerpc: Book3S 64-bit outline-only KASAN support 2022-05-22 15:58:29 +10:00
Makefile powerpc: Finalise cleanup around ABI use 2022-05-19 23:11:29 +10:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00