Message ID | 20200817103238.158133-3-aneesh.kumar@linux.ibm.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [v2,1/3] powerpc/numa: Introduce logical numa id | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (f04b169e953c4db1a3a3c1d23eea09c726f01ee5) |
snowpatch_ozlabs/build-ppc64le | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64be | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64e | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-pmac32 | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 28 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index d29f60e15777..7319084345e1 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -250,7 +250,8 @@ int affinity_domain_to_nid(struct affinity_domain *domain) if (!firmware_has_feature(FW_FEATURE_LPAR)) return domain_id; - if (domain_id == -1) + /* POWER4 LPAR uses 0xffff as invalid node */ + if (domain_id == -1 || domain_id == 0xffff) return NUMA_NO_NODE; nid = __affinity_domain_to_nid(domain_id, last_nid); @@ -283,10 +284,6 @@ static int associativity_to_nid(const __be32 *associativity) if (of_read_number(associativity, 1) >= min_common_depth) domain.id = of_read_number(&associativity[min_common_depth], 1); - /* POWER4 LPAR uses 0xffff as invalid node */ - if (domain.id == 0xffff) - domain.id = -1; - nid = affinity_domain_to_nid(&domain); if (nid > 0 && @@ -499,9 +496,6 @@ static int of_drconf_to_nid_single(struct drmem_lmb *lmb) index = lmb->aa_index * aa.array_sz + min_common_depth - 1; domain.id = of_read_number(&aa.arrays[index], 1); - if (domain.id == 0xffff) - domain.id = -1; - nid = affinity_domain_to_nid(&domain); if (nid > 0) {
Even though the comment says POWER4 usage, I guess it applies to all platforms since there is no PVR check there. This patch moves the check to the helper. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> --- arch/powerpc/mm/numa.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)