From patchwork Wed Oct 4 18:15:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 9985273 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 683DE60586 for ; Wed, 4 Oct 2017 18:17:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F38D28BD4 for ; Wed, 4 Oct 2017 18:17:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 540A728BD8; Wed, 4 Oct 2017 18:17:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6DB228BD4 for ; Wed, 4 Oct 2017 18:17:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzoCo-0001zF-1G; Wed, 04 Oct 2017 18:15:38 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzoCn-0001yn-6w for xen-devel@lists.xen.org; Wed, 04 Oct 2017 18:15:37 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 16/64-30688-84525D95; Wed, 04 Oct 2017 18:15:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKIsWRWlGSWpSXmKPExsVyMfTGVl131au RBlcOWFks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBlf/19mKbjAXXF1Zy9bA+MJji5GLg4hgUmM EjP3bmcFcVgE5jFLvG09y9jFyMkhIdDPKtF3Q6yLkQPIzpP4t7cAIpwmcXfVfnYIu0pi5sO9L CAlQgJqEmveREHM7GeSeP7uNxNInE1AR2LdjFqQchEBaYlrny+DTWcWiJA4/+EgG4gtLOAsMb V9KzOIzSKgKrF4bxdYDa+AtcTnA99ZIFbJS+xqu8gKYnMK2EjMmtIOViMEVNPXfpp1AqPgAka GVYwaxalFZalFuobmeklFmekZJbmJmTm6hgamermpxcWJ6ak5iUnFesn5uZsYgcHGAAQ7GC+e 9jzEKMnBpCTKO0v+aqQQX1J+SmVGYnFGfFFpTmrxIUYZDg4lCd4gFaCcYFFqempFWmYOMOxh0 hIcPEoivCkgad7igsTc4sx0iNQpRkuOC3cu/WHiOLDnFpDsuHn3D5MQS15+XqqUOG8rSIMASE NGaR7cOFhsXmKUlRLmZQQ6UIinILUoN7MEVf4VozgHo5IwrynIFJ7MvBK4ra+ADmICOmhO0xW Qg0oSEVJSDYxh4btXnjrNdM5/X66xYZ7quvtThK+XNYiIsDirnv1itbh18i7ZG9Fu7foljPma M2VrBHrs7xX0FiUFaS3+2R4nfGwel0bfH03VdAcf6XzTHjOGl/3/1ry6MkF+v63hFa7tMzIyL 84rDZO+atm8Tn/X72XFTm5TSydMc3JzZNsu1VGxevWmMCWW4oxEQy3mouJEAP704SzIAgAA X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-4.tower-206.messagelabs.com!1507140935!114565025!1 X-Originating-IP: [209.85.216.181] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32056 invoked from network); 4 Oct 2017 18:15:35 -0000 Received: from mail-qt0-f181.google.com (HELO mail-qt0-f181.google.com) (209.85.216.181) by server-4.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 4 Oct 2017 18:15:35 -0000 Received: by mail-qt0-f181.google.com with SMTP id z50so15876085qtj.4 for ; Wed, 04 Oct 2017 11:15:35 -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=MEmYS6IxTegIzPJbXZAp4NTTSK3vZuMuwzS7cLxF3h0=; b=PdOaXisM8ukbIf2OeyFam0TPCyU14UMoQ/CkcVxqqIF2Y8h3rg6MLEAeoPpK7EkyIm Dsx/SKwi0GmEJUMnC8vl0jMuy9AOv3z7UIxe4yMfeU5wjYOffzUJBfV95ILNa+7Cj5xb T0byx94DhTF1NzLupb6GJDISrR1cUfoQMc1Ts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MEmYS6IxTegIzPJbXZAp4NTTSK3vZuMuwzS7cLxF3h0=; b=ZhkhHYEUvOpNHuc17fmK0SStDkuhPoG1c75VCRYwhyY/kbvQp4oV9Se0AcuzxFuzbX 3v7dkKRyM5m06fIXD3GG3qknx6VALfmYyVuGE/hI5ApjyrJ5XjxRsXc6va5sgHa/NtFE KoZIKNb2pjcKsJuRmTI00bhVYt/j4YvuHc7AediSXcSMtd4w+rWM1asAu0cv74uenAw2 /eq2J/mvkGMdwpK/KHYyO+Nghe/SjCyT2R+dlNq7YYTmZR1iYBDCWE5OvtcgOSg5M5Oq yJXCStCYsXOQmEpxsXWQ5DtlfmG8wLrGHte3wqmHECArSE2+nC6brPcL7ScBOJBfzGri rr9Q== X-Gm-Message-State: AMCzsaWwvMmIDDo/sgMGzlv7NoYChCYEc+VBLvKTdsHlDMDI54sn1NEh Yg+nO796zmWiSyJ1Pr8+mlSsBUzL2To= X-Google-Smtp-Source: AOwi7QA+9j9N/aScmFq/8SBxyQ225+SYBaufTPQoXJ+zVUrI8mNiDJao/8vHEVJKPJhNzDNhybKYEQ== X-Received: by 10.200.38.35 with SMTP id u32mr11937197qtu.312.1507140934795; Wed, 04 Oct 2017 11:15:34 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id l188sm10210622qkd.43.2017.10.04.11.15.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 11:15:34 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 4 Oct 2017 19:15:20 +0100 Message-Id: <20171004181526.9405-2-julien.grall@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171004181526.9405-1-julien.grall@linaro.org> References: <20171004181526.9405-1-julien.grall@linaro.org> Cc: Julien Grall , Stefano Stabellini Subject: [Xen-devel] [PATCH 1/7] xen/arm: domain_build: Clean-up insert_11_bank 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" X-Virus-Scanned: ClamAV using ClamSMTP - Remove spurious () - Add missing spaces - Turn 1 << to 1UL << Signed-off-by: Julien Grall --- Cc: Stefano Stabellini --- xen/arch/arm/domain_build.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 3723dc3f78..093ebf1a8e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -109,11 +109,11 @@ static bool insert_11_bank(struct domain *d, spfn = page_to_mfn(pg); start = pfn_to_paddr(spfn); - size = pfn_to_paddr((1 << order)); + size = pfn_to_paddr(1UL << order); D11PRINT("Allocated %#"PRIpaddr"-%#"PRIpaddr" (%ldMB/%ldMB, order %d)\n", start, start + size, - 1UL << (order+PAGE_SHIFT-20), + 1UL << (order + PAGE_SHIFT - 20), /* Don't want format this as PRIpaddr (16 digit hex) */ (unsigned long)(kinfo->unassigned_mem >> 20), order); @@ -167,7 +167,8 @@ static bool insert_11_bank(struct domain *d, */ if ( start + size < bank->start && kinfo->mem.nr_banks < NR_MEM_BANKS ) { - memmove(bank + 1, bank, sizeof(*bank)*(kinfo->mem.nr_banks - i)); + memmove(bank + 1, bank, + sizeof(*bank) * (kinfo->mem.nr_banks - i)); kinfo->mem.nr_banks++; bank->start = start; bank->size = size;