From patchwork Thu Sep 29 01:18:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 77099 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp79866qgf; Wed, 28 Sep 2016 18:22:10 -0700 (PDT) X-Received: by 10.36.53.214 with SMTP id k205mr139156ita.85.1475112130907; Wed, 28 Sep 2016 18:22:10 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 3si23000483ity.43.2016.09.28.18.22.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2016 18:22:10 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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; dmarc=fail (p=NONE dis=NONE) header.from=linaro.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 1bpQ0u-0001Zu-Eg; Thu, 29 Sep 2016 01:19:52 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpQ0u-0001YR-2a for xen-devel@lists.xen.org; Thu, 29 Sep 2016 01:19:52 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id 1F/0B-21986-73C6CE75; Thu, 29 Sep 2016 01:19:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsVyMfTAWl2znDf hBk2H1C2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oxz3xILLnFXtL/bx9jAuICzi5GLQ0hgIqNE 89JPTCAOi8A8ZonFt0+wgDgSAv2sEu/OdLF3MXICOTESK1uPMkHY1RL/3jwCiwsJqEksO7yQG WJUE5PEojm3wRJsAjoSLybtZAOxRQSkJa59vswIUsQscIRR4tb8k8wgCWGBaImVL/axgNgsAq oSj6+cB7I5OHgFbCRaujwhlmlKTJ/1GqycEyj8oeUXM8Ria4ll3zazTGAUWMDIsIpRozi1qCy 1SNfITC+pKDM9oyQ3MTNH19DATC83tbg4MT01JzGpWC85P3cTIzC0GIBgB+OZBYGHGCU5mJRE eTl93oQL8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuC9kgWUEyxKTU+tSMvMAQY5TFqCg0dJhPcVS Jq3uCAxtzgzHSJ1itGYY8vva2uZOLZNvbeWSYglLz8vVUqc9ypIqQBIaUZpHtwgWPRdYpSVEu ZlBDpNiKcgtSg3swRV/hWjOAejkjDva5ApPJl5JXD7XgGdwgR0ytITL0BOKUlESEk1MBb4f0t x3Tzx90axxilO+g2c8mcfG927McWKLfkOvzfr8dVyJ+dyizGpLmNNco8422B1eduW73vOmdn9 VlrSeOVJ/nzheXum1uveZ5otrHMj4GD0vNIPWivbHc8cdHNoniktM+dwadWbi7zTRO/Ki/1Tv 7E6uF7vlJjKG8693pUhp78mzpk785gSS3FGoqEWc1FxIgDRmdPRuQIAAA== X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-7.tower-21.messagelabs.com!1475111989!35596533!1 X-Originating-IP: [209.85.192.173] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 58533 invoked from network); 29 Sep 2016 01:19:50 -0000 Received: from mail-pf0-f173.google.com (HELO mail-pf0-f173.google.com) (209.85.192.173) by server-7.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 29 Sep 2016 01:19:50 -0000 Received: by mail-pf0-f173.google.com with SMTP id 21so22909812pfy.0 for ; Wed, 28 Sep 2016 18:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J3Snq1De8lJrFH/gfT7dMIxSjbW4KRiC3Zd0VujEgSE=; b=ed0GxGqDvcQiylcI0hkrwT1zJMkyfESOo3sfq6MwXurv2rkkA9UPwGNF+yzi8Gk1es cf8oYosv4zTU3ihXhmmtUcWe9cUJG6iT9aTNzwysjdVqF5xkpyEN1sc6+Vz8lgAnsHBN e2cRt9z0kGk4kzHAJUmzQeSBB6rIhs/jZhRUU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=J3Snq1De8lJrFH/gfT7dMIxSjbW4KRiC3Zd0VujEgSE=; b=E9ZMQMB8dsQAu2iIvA5wqiqNcir2bZlaKUfPRkupCELTTahvIA0FR6A5EbuwqAvAQe PQs4cZdNrCdHBKg23GsPRk1Jf8tUjISqsryUElNND3c0temOirUpNJOQzEa2l31TWkN6 +kf10BBuv0X8uoH+gSCOaGJ4Elzze5j03G4a0i9UIWuJVJdJWRonxP1PP5PNqBMixEDi XT0X4f5GsOJgv7xucduJHO8Qye2OhQYZGVdVxyX+GCNF3UTEAmRvLjCmSYBzuMfyqEF4 MxxY231h05AtJyPs0MAWiEMy5hfC58iL+0B29DYGZMhm+2xIjCqYvMziXAUzBywtDqFk TrgQ== X-Gm-Message-State: AE9vXwN8x4BWIv18TzT7wj2iatICwV2Pi4Qj+waEgGeM9PTNY6+uR3jsBc9TBbx1qG3O58Ty X-Received: by 10.98.131.193 with SMTP id h184mr61266652pfe.92.1475111988959; Wed, 28 Sep 2016 18:19:48 -0700 (PDT) Received: from HZA160860128-A.china.huawei.com ([67.238.99.186]) by smtp.gmail.com with ESMTPSA id wd7sm15228744pab.2.2016.09.28.18.19.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 18:19:47 -0700 (PDT) From: Shannon Zhao To: xen-devel@lists.xen.org Date: Wed, 28 Sep 2016 18:18:58 -0700 Message-Id: <20160929011902.7784-13-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.10.0.windows.1 In-Reply-To: <20160929011902.7784-1-shannon.zhao@linaro.org> References: <20160929011902.7784-1-shannon.zhao@linaro.org> Cc: sstabellini@kernel.org, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, julien.grall@arm.com, Shannon Zhao , zhaoshenglong@huawei.com, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v8 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" 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 Acked-by: Wei Liu --- 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 a21dc56..19d3067 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);