From patchwork Thu Apr 20 11:25:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Wang X-Patchwork-Id: 13218543 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D618FC77B7C for ; Thu, 20 Apr 2023 11:29:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.524079.814708 (Exim 4.92) (envelope-from ) id 1ppSTO-0004oj-8J; Thu, 20 Apr 2023 11:29:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 524079.814708; Thu, 20 Apr 2023 11:29:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ppSTO-0004oV-4P; Thu, 20 Apr 2023 11:29:10 +0000 Received: by outflank-mailman (input) for mailman id 524079; Thu, 20 Apr 2023 11:29:06 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ppSQk-0006Vv-LM for xen-devel@lists.xenproject.org; Thu, 20 Apr 2023 11:26:26 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 2fb9e0f7-df6e-11ed-b21f-6b7b168915f2; Thu, 20 Apr 2023 13:26:26 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4ED0E1480; Thu, 20 Apr 2023 04:27:09 -0700 (PDT) Received: from a015966.shanghai.arm.com (a015966.shanghai.arm.com [10.169.190.5]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0BB0E3F587; Thu, 20 Apr 2023 04:26:22 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2fb9e0f7-df6e-11ed-b21f-6b7b168915f2 From: Henry Wang To: xen-devel@lists.xenproject.org Cc: Wei Chen , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Henry Wang Subject: [PATCH v3 13/17] xen/arm: implement numa_node_to_arch_nid for device tree NUMA Date: Thu, 20 Apr 2023 19:25:17 +0800 Message-Id: <20230420112521.3272732-14-Henry.Wang@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230420112521.3272732-1-Henry.Wang@arm.com> References: <20230420112521.3272732-1-Henry.Wang@arm.com> MIME-Version: 1.0 From: Wei Chen Device tree based NUMA doesn't have the proximity domain like ACPI. So we can return node id directly as arch nid. Signed-off-by: Wei Chen Signed-off-by: Henry Wang --- v2 -> v3: 1. No change. v1 -> v2: 1. Use numa_node_to_arch_nid instead of dummy node_to_pxm. --- xen/arch/arm/include/asm/numa.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/arch/arm/include/asm/numa.h b/xen/arch/arm/include/asm/numa.h index 8057db09c4..30b1fa39f1 100644 --- a/xen/arch/arm/include/asm/numa.h +++ b/xen/arch/arm/include/asm/numa.h @@ -48,6 +48,15 @@ extern void numa_detect_cpu_node(unsigned int cpu); extern int numa_device_tree_init(const void *fdt); extern void numa_init(void); +/* + * Device tree NUMA doesn't have architecural node id. + * So we can just return node id as arch nid. + */ +static inline unsigned int numa_node_to_arch_nid(nodeid_t n) +{ + return n; +} + #else /* Fake one node for now. See also node_online_map. */