powerpc: Only set numa node information for present cpus at boottime
authorLi Zhong <zhong@linux.vnet.ibm.com>
Wed, 27 Aug 2014 09:34:00 +0000 (17:34 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Sep 2014 13:14:53 +0000 (23:14 +1000)
commitbc3c4327c92b9ceb9a6356ec64d1b2ab2dc851f9
treeb2c70ae284ba74b239fc26fb716dc7016f7ad75b
parent70ad237515d99595ed03848bd8e549e50e83c4f2
powerpc: Only set numa node information for present cpus at boottime

As Nish suggested, it makes more sense to init the numa node informatiion
for present cpus at boottime, which could also avoid WARN_ON(1) in
numa_setup_cpu().

With this change, we also need to change the smp_prepare_cpus() to set up
numa information only on present cpus.

For those possible, but not present cpus, their numa information
will be set up after they are started, as the original code did before commit
2fabf084b6ad.

Cc: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Acked-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Tested-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/smp.c
arch/powerpc/mm/numa.c