From patchwork Thu Sep 22 12:52:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 76780 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp14819qgf; Thu, 22 Sep 2016 05:55:31 -0700 (PDT) X-Received: by 10.36.211.197 with SMTP id n188mr2482271itg.65.1474548931885; Thu, 22 Sep 2016 05:55:31 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 3si1819910ity.43.2016.09.22.05.55.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2016 05:55:31 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn3Ve-0004HI-8J; Thu, 22 Sep 2016 12:53:50 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn3Vd-0004GZ-J1 for xen-devel@lists.xen.org; Thu, 22 Sep 2016 12:53:49 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id 69/A3-11175-C54D3E75; Thu, 22 Sep 2016 12:53:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRWlGSWpSXmKPExsVi9XuGg27Mlcf hBn/bpCyWfFzM4sDocXT3b6YAxijWzLyk/IoE1owdJzexFpzjrrjX/5W9gXEWZxcjF4eQwClG iYWH1jFBOHsYJbqePQRyODnYBLQkzk//wQ5iiwjISqzumsMOUsQscJ1R4s77bawgCWGBaInzX 9YDJTg4WARUJbr/5oKEeQU8Jb6tWMkGYksIaEis7J3AAmJzAsUnHFkP1iok4CGx8spCVoh6QY mTM5+A1TALSEgcfPGCGaJXUaJt/UmoOZISB1fcYAG5QQLk6ofLjjJCJEwlbi/sYZ7AKDgLyax ZSGYtYGRaxahenFpUllqka6qXVJSZnlGSm5iZo2toYKaXm1pcnJiempOYVKyXnJ+7iREYoAxA sINx+mX/Q4ySHExKorwX+h+HC/El5adUZiQWZ8QXleakFh9ilOHgUJLgfXwJKCdYlJqeWpGWm QOMFZi0BAePkghv8WWgNG9xQWJucWY6ROoUo6KUOO9vkD4BkERGaR5cGyw+LzHKSgnzMgIdIs RTkFqUm1mCKv+KUZyDUUmYVwxkPE9mXgnc9FdAi5mAFm/5+QBkcUkiQkqqgXHNNE6R4vMle/u utVwW8mSPk5Zh+M5yhSNbMfX63vcVsVkFZw6t47G62rQyVbB3313r78dm7DnJEqgRejL2StPk O269hoHaWue+SktMKykqYLHd+fScWFRYT/ivuf+FpSPWVx6zq77/cxunRNP/6XXKCVI8FhM4T n9QsZWP3PVOfZVL/CKrBiWW4oxEQy3mouJEADgCotzKAgAA X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-14.tower-27.messagelabs.com!1474548823!48234722!1 X-Originating-IP: [58.251.152.64] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 53838 invoked from network); 22 Sep 2016 12:53:47 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (58.251.152.64) by server-14.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 22 Sep 2016 12:53:47 -0000 Received: from 172.24.1.36 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.36]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DRK49275; Thu, 22 Sep 2016 20:53:10 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Thu, 22 Sep 2016 20:52:58 +0800 From: z00226004 To: Date: Thu, 22 Sep 2016 20:52:29 +0800 Message-ID: <1474548753-12596-13-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1474548753-12596-1-git-send-email-zhaoshenglong@huawei.com> References: <1474548753-12596-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.57E3D439.00CD, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e615fb149b540f519a9bdc9f442500ea Cc: sstabellini@kernel.org, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, peter.huangpeng@huawei.com, julien.grall@arm.com, shannon.zhao@linaro.org, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v6 12/16] libxl/arm: Factor finalise_one_memory_node as a gerneric function X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" From: Shannon Zhao Rename finalise_one_memory_node to finalise_one_node and pass the node name via function parameter. This is useful for adding ACPI module which will be added by a later patch. Signed-off-by: Shannon Zhao Acked-by: Julien Grall --- tools/libxl/libxl_arm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 2a4577c..f7f2c60 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -905,11 +905,11 @@ out: return rc; } -static void finalise_one_memory_node(libxl__gc *gc, void *fdt, - uint64_t base, uint64_t size) +static void finalise_one_node(libxl__gc *gc, void *fdt, const char *uname, + uint64_t base, uint64_t size) { int node, res; - const char *name = GCSPRINTF("/memory@%"PRIx64, base); + const char *name = GCSPRINTF("%s@%"PRIx64, uname, base); node = fdt_path_offset(fdt, name); assert(node > 0); @@ -972,7 +972,7 @@ int libxl__arch_domain_finalise_hw_description(libxl__gc *gc, for (i = 0; i < GUEST_RAM_BANKS; i++) { const uint64_t size = (uint64_t)dom->rambank_size[i] << XC_PAGE_SHIFT; - finalise_one_memory_node(gc, fdt, bankbase[i], size); + finalise_one_node(gc, fdt, "/memory", bankbase[i], size); } debug_dump_fdt(gc, fdt);