From patchwork Tue Jul 5 03:12:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 71384 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp92044qgy; Mon, 4 Jul 2016 20:20:05 -0700 (PDT) X-Received: by 10.36.7.15 with SMTP id f15mr11020212itf.39.1467688805261; Mon, 04 Jul 2016 20:20:05 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id v186si1393019iod.113.2016.07.04.20.20.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 20:20:05 -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 1bKGsA-0001bk-NX; Tue, 05 Jul 2016 03:18:06 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKGs9-0001b2-H3 for xen-devel@lists.xen.org; Tue, 05 Jul 2016 03:18:05 +0000 Received: from [193.109.254.147] by server-4.bemta-14.messagelabs.com id 5C/24-30629-CE62B775; Tue, 05 Jul 2016 03:18:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsVSPpHPUfeNWnW 4wb81nBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bFjctYC/5wV0zd95O5gfE4ZxcjF4eQwClG iVdthxkhnN2MEh8WPWPpYuTkYBPQlfi4cQo7iC0iICuxumsOmM0s8IFR4tRsiS5GDg5hgWiJh z9iQMIsAioSx/4eZAaxeQU8JfbMOcsGYksIaEis7J0ANpITKP71JoQtJOAh0X9gPStEvaDEyZ lPWCDGS0gcfPGCGaJXUaJt/UmoOZISB1fcYIGwgY7+spQLwjaVuHd0LssERsFZSEbNQjJqASP TKkaN4tSistQiXSNjvaSizPSMktzEzBxdQ0MTvdzU4uLE9NScxKRiveT83E2MwPCsZ2Bg3ME4 67jfIUZJDiYlUd5X/6rChfiS8lMqMxKLM+KLSnNSiw8xynBwKEnwOgDDXUiwKDU9tSItMwcYK TBpCQ4eJRHeW6pAad7igsTc4sx0iNQpRkUpcV5GkD4BkERGaR5cGyw6LzHKSgnzMjIwMAjxFK QW5WaWoMq/YhTnYFQS5hUFmcKTmVcCN/0V0GImoMWsseUgi0sSEVJSDYwbOJ00rzeFvP88vXj OpIqTH/rEIsycpj7mKxRX61ri+TFHJkagLsqrTDpW++TZP5Iz/gmG1sUvFl94J3Lap0B7w9rw 9faSve5ec/qaxIWfrOMoEcr9I3BYbarGkxsbHuyarj/1K+e96q1r2twuss11fT3zw4zIb8r35 NN9Dhcc/F3LJbU3ikuJpTgj0VCLuag4EQAt/NGyyQIAAA== X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1467688677!51000125!1 X-Originating-IP: [119.145.14.65] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NSA9PiA3NzQ2Mw==\n X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26591 invoked from network); 5 Jul 2016 03:18:03 -0000 Received: from szxga02-in.huawei.com (HELO szxga02-in.huawei.com) (119.145.14.65) by server-4.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 5 Jul 2016 03:18:03 -0000 Received: from 172.24.1.47 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.1.47]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DJT72012; Tue, 05 Jul 2016 11:14:14 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.235.1; Tue, 5 Jul 2016 11:14:05 +0800 From: Shannon Zhao To: Date: Tue, 5 Jul 2016 11:12:44 +0800 Message-ID: <1467688367-17320-15-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1467688367-17320-1-git-send-email-zhaoshenglong@huawei.com> References: <1467688367-17320-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.0A020204.577B2606.00C4, 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: 9032f5a9969a0ff5ded738ae1b9c2f56 Cc: hangaohuai@huawei.com, 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 v3 14/17] 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 --- 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 94cb773..6820fd4 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -900,11 +900,11 @@ int libxl__arch_domain_init_hw_description(libxl__gc *gc, return libxl__prepare_acpi(gc, info, state, dom); } -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); @@ -967,7 +967,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);