powerpc: some changes in numa_setup_cpu()
authorLi Zhong <zhong@linux.vnet.ibm.com>
Wed, 27 Aug 2014 09:34:01 +0000 (17:34 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Sep 2014 13:14:53 +0000 (23:14 +1000)
commit297cf5025b3bda59e15d6ba1f84022ebd409925b
tree96ef77c364307dc99f71fbcd050140e6ca16bcee
parentbc3c4327c92b9ceb9a6356ec64d1b2ab2dc851f9
powerpc: some changes in numa_setup_cpu()

this patches changes some error handling logics in numa_setup_cpu(),
when cpu node is not found, so:

if the cpu is possible, but not present, -1 is kept in numa_cpu_lookup_table,
so later, if the cpu is added, we could set correct numa information for it.

if the cpu is present, then we set the first online node to
numa_cpu_lookup_table instead of 0 ( in case 0 might not be an online node? )

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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/numa.c