diff options
author | Michael Bringmann | 2017-11-28 23:58:43 +0100 |
---|---|---|
committer | Michael Ellerman | 2018-01-27 10:59:45 +0100 |
commit | e67e02a544e9a0d24b99eb383e808bb3433b048d (patch) | |
tree | 25273be02407c4cc3748b61c1d9f837eab407e55 /arch/powerpc/mm | |
parent | powerpc/numa: Ensure nodes initialized for hotplug (diff) | |
download | kernel-qcow2-linux-e67e02a544e9a0d24b99eb383e808bb3433b048d.tar.gz kernel-qcow2-linux-e67e02a544e9a0d24b99eb383e808bb3433b048d.tar.xz kernel-qcow2-linux-e67e02a544e9a0d24b99eb383e808bb3433b048d.zip |
powerpc/pseries: Fix cpu hotplug crash with memoryless nodes
On powerpc systems with shared configurations of CPUs and memory and
memoryless nodes at boot, an event ordering problem was observed on a
SLES12 build platforms with the hot-add of CPUs to the memoryless
nodes.
* The most common error occurred when the memory SLAB driver attempted
to reference the memoryless node to which a CPU was being added
before the kernel had finished initializing all of the data
structures for the CPU and exited 'device_online' under
DLPAR/hot-add.
Normally the memoryless node would be initialized through the call
path device_online ... arch_update_cpu_topology ... find_cpu_nid ...
try_online_node. This patch ensures that the powerpc node will be
initialized as early as possible, even if it was memoryless and
CPU-less at the point when we are trying to hot-add a new CPU to it.
Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/numa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 1bead2c67272..314d19ab9385 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -1198,7 +1198,7 @@ static long vphn_get_associativity(unsigned long cpu, return rc; } -static inline int find_and_online_cpu_nid(int cpu) +int find_and_online_cpu_nid(int cpu) { __be32 associativity[VPHN_ASSOC_BUFSIZE] = {0}; int new_nid; @@ -1229,6 +1229,8 @@ static inline int find_and_online_cpu_nid(int cpu) #endif } + pr_debug("%s:%d cpu %d nid %d\n", __FUNCTION__, __LINE__, + cpu, new_nid); return new_nid; } |