From patchwork Tue Aug 16 10:25:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 73991 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1918230qga; Tue, 16 Aug 2016 03:29:08 -0700 (PDT) X-Received: by 10.107.164.80 with SMTP id n77mr5228602ioe.105.1471343345672; Tue, 16 Aug 2016 03:29:05 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 186si21261812ita.73.2016.08.16.03.29.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 03:29: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 1bZbaC-0001xY-Kt; Tue, 16 Aug 2016 10:26:56 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZbaB-0001wo-6w for xen-devel@lists.xen.org; Tue, 16 Aug 2016 10:26:55 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 5E/06-12874-E6AE2B75; Tue, 16 Aug 2016 10:26:54 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsVi9XuGg27uq03 hBpNeGVks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBl/Vz1iK1jAXbFvyx/GBsYPHF2MXBxCAqcY JW5+eswI4exhlPj56xJTFyMnB5uArsTHjVPYQWwRAVmJ1V1z2EGKmAWuM0rceb+NtYuRg0NYI FpicUMFSA2LgKrE5V37GUFsXgFPifPnV4LZEgIaEit7J7CAlHMCxa9NYQMJCwl4SJyeuZAVol xQ4uTMJywgNrOAhMTBFy+YIVoVJdrWn2SDsCUlDq64wQJhAx29ZJIbhG0qMe3yMeYJjIKzkIy ahWTUAkamVYwaxalFZalFukYGeklFmekZJbmJmTm6hgamermpxcWJ6ak5iUnFesn5uZsYgeFZ z8DAuIOxcbbfIUZJDiYlUd6ZEzeGC/El5adUZiQWZ8QXleakFh9ilOHgUJLgDXq5KVxIsCg1P bUiLTMHGCkwaQkOHiUR3gKQNG9xQWJucWY6ROoUo6KUOK8cSEIAJJFRmgfXBovOS4yyUsK8jA wMDEI8BalFuZklqPKvGMU5GJWEeStApvBk5pXATX8FtJgJaLG+9AaQxSWJCCmpBkaNym+i3Nc 2fyjpOXbzcU1/9c+DO6IYG05f2tnea8LIs8b51k+zzw8nrN3zo9Hs3vmoEMYMn9dVPX/M7oQ2 T2uof/Cb9XvY1JtbHn471vjZ8vjU1pkm0828LEsszNMmbb+6hyk//Vyfke/nGS9UA87XbnffO 6XPb3rVlSSlS/cKfs5iF3X7b7peiaU4I9FQi7moOBEAd+sn8ckCAAA= X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-8.tower-206.messagelabs.com!1471343209!54552929!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 40542 invoked from network); 16 Aug 2016 10:26:53 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (58.251.152.64) by server-8.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 16 Aug 2016 10:26:53 -0000 Received: from 172.24.1.36 (EHLO szxeml434-hub.china.huawei.com) ([172.24.1.36]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DPP02661; Tue, 16 Aug 2016 18:26:22 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml434-hub.china.huawei.com (10.82.67.225) with Microsoft SMTP Server id 14.3.235.1; Tue, 16 Aug 2016 18:25:40 +0800 From: Shannon Zhao To: Date: Tue, 16 Aug 2016 18:25:09 +0800 Message-ID: <1471343113-10652-13-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1471343113-10652-1-git-send-email-zhaoshenglong@huawei.com> References: <1471343113-10652-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.0A090201.57B2EA4E.00D0, 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: f42aa8cdbefa5b7fdb0e42dfc5081098 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 v4 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 fa0497c..b95fdf5 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -904,11 +904,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); @@ -971,7 +971,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);