Commit 08145598 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by sanglipeng
Browse files

powerpc/pseries: Consolidate different NUMA distance update code paths

stable inclusion
from stable-v5.10.178
commit 18ce785effd986f8e4270b4fe160eeb759c7aea6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8D927

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=18ce785effd986f8e4270b4fe160eeb759c7aea6



--------------------------------

[ Upstream commit 8ddc6448 ]

The associativity details of the newly added resourced are collected from
the hypervisor via "ibm,configure-connector" rtas call. Update the numa
distance details of the newly added numa node after the above call.

Instead of updating NUMA distance every time we lookup a node id
from the associativity property, add helpers that can be used
during boot which does this only once. Also remove the distance
update from node id lookup helpers.

Currently, we duplicate parsing code for ibm,associativity and
ibm,associativity-lookup-arrays in the kernel. The associativity array provided
by these device tree properties are very similar and hence can use
a helper to parse the node id and numa distance details.

Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210812132223.225214-4-aneesh.kumar@linux.ibm.com


Stable-dep-of: b277fc79 ("powerpc/papr_scm: Update the NUMA distance table for the target node")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>

 Conflicts:
	arch/powerpc/include/asm/topology.h

Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 8099bd33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment