From nobody Tue Feb 10 14:49:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1681989983008895.198358419138; Thu, 20 Apr 2023 04:26:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.524035.814608 (Exim 4.92) (envelope-from ) id 1ppSQF-0007dT-PQ; Thu, 20 Apr 2023 11:25:55 +0000 Received: by outflank-mailman (output) from mailman id 524035.814608; Thu, 20 Apr 2023 11:25:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ppSQF-0007dI-Kf; Thu, 20 Apr 2023 11:25:55 +0000 Received: by outflank-mailman (input) for mailman id 524035; Thu, 20 Apr 2023 11:25:54 +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 1ppSQE-0006Vv-91 for xen-devel@lists.xenproject.org; Thu, 20 Apr 2023 11:25:54 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 1c6c5186-df6e-11ed-b21f-6b7b168915f2; Thu, 20 Apr 2023 13:25:53 +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 E60761480; Thu, 20 Apr 2023 04:26:36 -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 A30503F587; Thu, 20 Apr 2023 04:25:50 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1c6c5186-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 04/17] xen/arm: use arch_get_ram_range to memory ranges from bootinfo Date: Thu, 20 Apr 2023 19:25:08 +0800 Message-Id: <20230420112521.3272732-5-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 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1681989985051100001 Content-Type: text/plain; charset="utf-8" From: Wei Chen Implement the same helper "arch_get_ram_range" as x86 for NUMA code to get memory bank from Arm bootinfo. Signed-off-by: Wei Chen Signed-off-by: Henry Wang --- v2 -> v3: 1. No change. v1 -> v2: 1. Use arch_get_ram_range instead of arch_get_memory_map. --- xen/arch/arm/numa.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/arm/numa.c b/xen/arch/arm/numa.c index c5ef81aad3..a0e7b14925 100644 --- a/xen/arch/arm/numa.c +++ b/xen/arch/arm/numa.c @@ -100,3 +100,14 @@ unsigned char __node_distance(nodeid_t from, nodeid_t = to) } =20 EXPORT_SYMBOL(__node_distance); + +int __init arch_get_ram_range(unsigned int idx, paddr_t *start, paddr_t *e= nd) +{ + if ( idx >=3D bootinfo.mem.nr_banks ) + return -ENOENT; + + *start =3D bootinfo.mem.bank[idx].start; + *end =3D *start + bootinfo.mem.bank[idx].size; + + return 0; +} --=20 2.25.1