From patchwork Thu Jun 23 03:17:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 70718 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp217339qgy; Wed, 22 Jun 2016 20:20:48 -0700 (PDT) X-Received: by 10.36.46.80 with SMTP id i77mr19092677ita.60.1466652032123; Wed, 22 Jun 2016 20:20:32 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id n195si2976527itg.73.2016.06.22.20.20.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2016 20:20:32 -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 1bFvAg-0000ul-9l; Thu, 23 Jun 2016 03:19:14 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFvAe-0000s2-TN for xen-devel@lists.xen.org; Thu, 23 Jun 2016 03:19:12 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id FA/B2-09256-0355B675; Thu, 23 Jun 2016 03:19:12 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsVi9XuGg65BaHa 4QdNEdoslHxezODB6HN39mymAMYo1My8pvyKBNWPfuidsBX+4K3Zv+8DawHics4uRk0NI4BSj xIk+pi5GLiB7D6PExAnbmUASbAK6Eh83TmEHsUUEZCVWd81hByliFrjOKHHn/TbWLkYODmGBa In7RzVAalgEVCVWvF8D1ssr4CHRufEHK4gtIaAhsbJ3AguIzQkUPznrCTPEYneJOWv2skDUC0 qcnPkEzGYWkJA4+OIFM0SvokTb+pNsELakxMEVN1hAbpAAOfr0lNlQRaYSB17sZZ3AKDgLyax ZSGYtYGRaxahenFpUllqka6yXVJSZnlGSm5iZo2toYKaXm1pcnJiempOYVKyXnJ+7iREYngxA sIOx45/TIUZJDiYlUV4rh+xwIb6k/JTKjMTijPii0pzU4kOMMhwcShK8G0OAcoJFqempFWmZO cBIgUlLcPAoifDuAUnzFhck5hZnpkOkTjEqSonzHgNJCIAkMkrz4Npg0XmJUVZKmJcR6BAhno LUotzMElT5V4ziHIxKwrxTQKbwZOaVwE1/BbSYCWjxsv50kMUliQgpqQZGhYYYzZvSP5xq3k9 JvBi+7n5xm+h18fjauKuqDd3BGanuHi82Lmrz/G+Y/uxWToz4i1c2lj6Pb09gv3OofKb+jvcB HXs0T8dsenbvdpPqAc4vryp7a/7kCN/7f8/G9ttDZuHdFjbS8vxi7L+91J5diZorsjhSsfv3q Qqrjp1N7LvOVGziTbujxFKckWioxVxUnAgAaX6YI8kCAAA= X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-11.tower-21.messagelabs.com!1466651948!20333767!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.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30144 invoked from network); 23 Jun 2016 03:19:11 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (58.251.152.64) by server-11.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 23 Jun 2016 03:19:11 -0000 Received: from 172.24.1.36 (EHLO szxeml430-hub.china.huawei.com) ([172.24.1.36]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DMQ09549; Thu, 23 Jun 2016 11:17:46 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.235.1; Thu, 23 Jun 2016 11:17:35 +0800 From: Shannon Zhao To: Date: Thu, 23 Jun 2016 11:17:01 +0800 Message-ID: <1466651824-6964-15-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1466651824-6964-1-git-send-email-zhaoshenglong@huawei.com> References: <1466651824-6964-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.0A020201.576B54DA.01F5, 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: 3577221f5b9462482043fc70983e79cc 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 v2 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 a766732..97958ed 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -903,11 +903,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); @@ -970,7 +970,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);