From patchwork Wed Mar 14 18:19:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 131707 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp156956ljb; Wed, 14 Mar 2018 11:22:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELtaswnfmUASOnzf2EXmC6mebRnvf3KwalSAl4TLS5rQ+60beTJqZiFFcgE15FYO1z9y47js X-Received: by 2002:a24:3a95:: with SMTP id m143-v6mr3189488itm.128.1521051752138; Wed, 14 Mar 2018 11:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521051752; cv=none; d=google.com; s=arc-20160816; b=zpVDISYkWl+OtbWRk6jH0XlpDwfS5jJ9iwqF3DnqUTVqN7GNvj/RfdbTloo7iGYOyV AgMjW2A/W7AukopluljvaDzBVwNFxst8180QB8QXwNKyzuKzwqbXFT0D5rYkzGomY048 bxQ0ATzOmWMLOIaU280gZOxOZ9OatpZRwUmuqI0MgMAcmKS0uO9y8LqYhR6iUqHup1x7 QOxtWTo9lpKgv09Qtj/OetAKmS+BWXc3qUrmat2o1x96tdci8LSWUatKvSz/cxTLe6er XK6BFPqTVeWQdcTjmhD9RMX/DGUoazixqnbLTOKzwdBJrcSHBlRkWV8ab/mFZJqDNneq 24CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=r9PQaGiGGeMA9FgWMLOM3A/MCHSBaOSj7kImdE9/Szw=; b=aw1ZGgGTjKIBsOnXwCxwPGRfZYJ/B8N648uCETRfymtXdgkstvnw+prZD4vgAiusof xE3/nyWMAO/4Zjl+lZsyPxn24LA1W+nU65q+Y1pVWl3WlrJPx1ppudJo7TvairfVWS4Q rtLGVFPYyPbnRCx3yNm0AId7ApyD4qaTXvRJl/se6oaFVEoJdy7EbXXZ8rTgWxP5edWg WVNGijb+6lDXAZ3KQyLizH+SvDJIZpCF8vfS/pBnQXwppkg80594Gqr1i79WN46zgiy0 CdvgVQGmUKfXXwXKQAyeG4FH3Yt33ikXbQhop+o9Mbt2V03Xhjxd2toIbQ2ZkCtHExm6 Z2sA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f134si1191020itb.164.2018.03.14.11.22.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 11:22:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.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 1ewB0l-0006ni-IM; Wed, 14 Mar 2018 18:20:27 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewB0j-0006kY-KN for xen-devel@lists.xen.org; Wed, 14 Mar 2018 18:20:25 +0000 X-Inumbo-ID: 5e948faa-27b4-11e8-8248-2fda3a446a53 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id 5e948faa-27b4-11e8-8248-2fda3a446a53; Wed, 14 Mar 2018 18:20:27 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A89C515AB; Wed, 14 Mar 2018 11:20:19 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E12BE3F53D; Wed, 14 Mar 2018 11:20:18 -0700 (PDT) From: julien.grall@arm.com To: xen-devel@lists.xen.org Date: Wed, 14 Mar 2018 18:19:55 +0000 Message-Id: <20180314182009.14274-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180314182009.14274-1-julien.grall@arm.com> References: <20180314182009.14274-1-julien.grall@arm.com> Cc: Julien Grall , Stefano Stabellini Subject: [Xen-devel] [PATCH v5 02/16] xen/arm: setup: use maddr_to_mfn rather than _mfn(paddr_to_pfn(...)) X-BeenThere: xen-devel@lists.xenproject.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.xenproject.org Sender: "Xen-devel" From: Julien Grall The construction _mfn(paddr_to_pfn(...)) can be simplified by using maddr_to_mfn. Signed-off-by: Julien Grall Reviewed-by: George Dunlap --- Cc: Stefano Stabellini Changes in v4: - Patch added --- xen/arch/arm/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 462736633b..9e1450b7d4 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -268,8 +268,8 @@ void __init discard_initial_modules(void) if ( mi->module[i].kind == BOOTMOD_XEN ) continue; - if ( !mfn_valid(_mfn(paddr_to_pfn(s))) || - !mfn_valid(_mfn(paddr_to_pfn(e)))) + if ( !mfn_valid(maddr_to_mfn(s)) || + !mfn_valid(maddr_to_mfn(e)) ) continue; dt_unreserved_regions(s, e, init_domheap_pages, 0);