From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by kanga.kvack.org (Postfix) with ESMTP id 515CF8E0001 for ; Sun, 16 Sep 2018 23:05:39 -0400 (EDT) Received: by mail-pl1-f197.google.com with SMTP id c5-v6so7304250plo.2 for ; Sun, 16 Sep 2018 20:05:39 -0700 (PDT) Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690113.outbound.protection.outlook.com. [40.107.69.113]) by mx.google.com with ESMTPS id t80-v6si15339436pfk.228.2018.09.16.20.05.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Sep 2018 20:05:38 -0700 (PDT) From: Sasha Levin Subject: [PATCH AUTOSEL 4.9 04/57] x86/numa_emulation: Fix emulated-to-physical node mapping Date: Mon, 17 Sep 2018 03:03:46 +0000 Message-ID: <20180917030340.378-4-alexander.levin@microsoft.com> References: <20180917030340.378-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030340.378-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: Dan Williams , David Rientjes , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Wei Yang , "linux-mm@kvack.org" , Ingo Molnar , Sasha Levin From: Dan Williams [ Upstream commit 3b6c62f363a19ce82bf378187ab97c9dc01e3927 ] Without this change the distance table calculation for emulated nodes may use the wrong numa node and report an incorrect distance. Signed-off-by: Dan Williams Cc: David Rientjes Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wei Yang Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/153089328103.27680.14778434392225818887.stgi= t@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/mm/numa_emulation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index a8f90ce3dedf..dc6d99017f3f 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c @@ -60,7 +60,7 @@ static int __init emu_setup_memblk(struct numa_meminfo *e= i, eb->nid =3D nid; =20 if (emu_nid_to_phys[nid] =3D=3D NUMA_NO_NODE) - emu_nid_to_phys[nid] =3D nid; + emu_nid_to_phys[nid] =3D pb->nid; =20 pb->start +=3D size; if (pb->start >=3D pb->end) { --=20 2.17.1