Message ID | 1443719063-6832-5-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDYNJBOFRECBBNOQWWYAKGQEQZBB5KQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 0FEAE23010 for <linaro@patches.linaro.org>; Thu, 1 Oct 2015 17:07:03 +0000 (UTC) Received: by laak17 with SMTP id k17sf39345733laa.3 for <linaro@patches.linaro.org>; Thu, 01 Oct 2015 10:07:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=0/AUOdw/vmQr4zGoIA7Ba95zXcCrNpXB19L3VVmEonc=; b=M7YfE+W+llKfbjFrtjEkvCAS7bf+RkVYje65nc1uWF3dHGwE8052fnUnCVbZRr6+Au BoAdARST+JmdP+luTZdNh1n7DOxmFlk3TQJ8qQe8BWndMP/p7XRTIWKhCGu8K5e0Cyap S+XWUlOqKsx1TStE2nEPVPJ9s3azUiaiDwYthFmRo1vflfCGcDefzm+ECKvLOhEmg6Sn kQj34lgztY6tJATN+bzQQhi2LfvI+wtMVqBGno49S+zUCaJ0+pG9TDRrEYgsjfCjmZDk iZL94FuzPpDudhvMV4c6Tl6O1znuO5tBqmSqcTJ0wdvUGXFHBLF540Kx139ltzpCl3tB eR9w== X-Gm-Message-State: ALoCoQnM03LB4a4anmNzSAyMM7QYHN7uTyH4b+twEA+eLg1MQ8Bom8y+SoPLOGFFbC+9pFkIIU2z X-Received: by 10.112.26.212 with SMTP id n20mr1653796lbg.2.1443719221588; Thu, 01 Oct 2015 10:07:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.208.78 with SMTP id h75ls137711lfg.83.gmail; Thu, 01 Oct 2015 10:07:01 -0700 (PDT) X-Received: by 10.25.84.195 with SMTP id i186mr2226857lfb.43.1443719221459; Thu, 01 Oct 2015 10:07:01 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id kw4si2322284lbc.9.2015.10.01.10.07.01 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 10:07:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbcao8 with SMTP id ao8so13105659lbc.3 for <patchwork-forward@linaro.org>; Thu, 01 Oct 2015 10:07:01 -0700 (PDT) X-Received: by 10.112.202.35 with SMTP id kf3mr3438950lbc.19.1443719221079; Thu, 01 Oct 2015 10:07:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp729712lbq; Thu, 1 Oct 2015 10:07:00 -0700 (PDT) X-Received: by 10.180.93.131 with SMTP id cu3mr4299469wib.45.1443719220489; Thu, 01 Oct 2015 10:07:00 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id br17si4840370wib.49.2015.10.01.10.07.00 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 10:07:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZhhIY-0003c1-DT; Thu, 01 Oct 2015 17:05:38 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZhhHv-0001zC-Lw for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2015 17:05:01 +0000 Received: by wiclk2 with SMTP id lk2so37898110wic.1 for <linux-arm-kernel@lists.infradead.org>; Thu, 01 Oct 2015 10:04:38 -0700 (PDT) X-Received: by 10.180.36.212 with SMTP id s20mr4614776wij.14.1443719077890; Thu, 01 Oct 2015 10:04:37 -0700 (PDT) Received: from localhost.localdomain ([83.225.55.104]) by smtp.gmail.com with ESMTPSA id x9sm7036760wjf.44.2015.10.01.10.04.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Oct 2015 10:04:37 -0700 (PDT) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, matt.fleming@intel.com, linux@arm.linux.org.uk, will.deacon@arm.com, grant.likely@linaro.org, leif.lindholm@linaro.org, roy.franz@linaro.org, mark.rutland@arm.com, catalin.marinas@arm.com Subject: [PATCH 4/9] ARM: only consider memblocks with NOMAP cleared for linear mapping Date: Thu, 1 Oct 2015 19:04:18 +0200 Message-Id: <1443719063-6832-5-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443719063-6832-1-git-send-email-ard.biesheuvel@linaro.org> References: <1443719063-6832-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151001_100500_150196_971C469D X-CRM114-Status: GOOD ( 14.33 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.171 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.171 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: ryan.harkin@linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>, msalter@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 8a63b4cdc0f2..1c667c6804a6 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -191,7 +191,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low, #ifdef CONFIG_HAVE_ARCH_PFN_VALID int pfn_valid(unsigned long pfn) { - return memblock_is_memory(__pfn_to_phys(pfn)); + return memblock_is_map_memory(__pfn_to_phys(pfn)); } EXPORT_SYMBOL(pfn_valid); #endif diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index b74686be6272..008f28ef6d68 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1388,6 +1388,9 @@ static void __init map_lowmem(void) phys_addr_t end = start + reg->size; struct map_desc map; + if (memblock_is_nomap(reg)) + continue; + if (end > arm_lowmem_limit) end = arm_lowmem_limit; if (start >= end)
Take the new memblock attribute MEMBLOCK_NOMAP into account when deciding whether a certain region is or should be covered by the kernel direct mapping. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm/mm/init.c | 2 +- arch/arm/mm/mmu.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)