From patchwork Mon Feb 1 10:54:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 60896 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2970863lbb; Mon, 1 Feb 2016 02:56:55 -0800 (PST) X-Received: by 10.98.2.216 with SMTP id 207mr29644717pfc.3.1454324215573; Mon, 01 Feb 2016 02:56:55 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id h21si45733770pfj.153.2016.02.01.02.56.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2016 02:56:55 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org 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 1aQC90-0002dj-Nb; Mon, 01 Feb 2016 10:55:42 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQC8r-0002P4-K2 for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2016 10:55:34 +0000 Received: by mail-wm0-x22f.google.com with SMTP id l66so64037030wml.0 for ; Mon, 01 Feb 2016 02:55:13 -0800 (PST) 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=T1f7/pkiYiQ1yeqvCbUGZ496V60y9FdUQ7vSoZeqXvQ=; b=T/31zgw/c9FZufMGHwB+fl2eRvZOybpvjpuFPKTy9RTxzZWGkuKdfxeGsJgYpKDMoz K/3gtDLXFDFBjrR+Y5wpWVfUk1eJBDoNaaGY46kKZhCa2+s3YksqzSQ0EYv9qdaCUWb7 +L3Rk3Qmenb6Jc6j3iSRXEzBeqS1MfswDnzD4= 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=T1f7/pkiYiQ1yeqvCbUGZ496V60y9FdUQ7vSoZeqXvQ=; b=KhzZBtvIriwSld/M9k10YOUWtMMFgMQiO1DMxmS/ePfaPc3NECxLVEbLIPLQC4WM9x AlrNxjszp4DaOBvJEI/c9sifyGGo6o0NNwBb3dg+tjUHSEDgo7nqD6xd1K3M4rwmjG6R kXUYkcBDuZ5khkZnA6Q3x/XP+Oge6ipmXwq8IJMGK7u5qHZ6//GsulPBbFW3VucleGwZ t463ZRhcAB9OL//eVLxPZRWlJAoZ0WisNGMGioRi0TtwKrnkvuWu1H0RVhk/fOnggrGa gmgDU/54Wwd9AXoiXLD1pLMMEhhXMQhibCXEw+IWIlFEWW1znXtmHN2WG3cGFUmIWXLP qY9w== X-Gm-Message-State: AG10YOTLyJ+fWVHE2wk9OswTKr9ou6SqEc76VBMZQqXleZisofyklcX0J7u9Rzb22v+0SIkp X-Received: by 10.28.50.193 with SMTP id y184mr11260708wmy.103.1454324112126; Mon, 01 Feb 2016 02:55:12 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id u191sm10821039wmd.4.2016.02.01.02.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 02:55:11 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, mark.rutland@arm.com, marc.zyngier@arm.com Subject: [PATCH v5sub1 1/8] of/fdt: make memblock minimum physical address arch configurable Date: Mon, 1 Feb 2016 11:54:46 +0100 Message-Id: <1454324093-15998-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454324093-15998-1-git-send-email-ard.biesheuvel@linaro.org> References: <1454324093-15998-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160201_025533_895125_DA46AA97 X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22f listed in] [list.dnswl.org] -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.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org By default, early_init_dt_add_memory_arch() ignores memory below the base of the kernel image since it won't be addressable via the linear mapping. However, this is not appropriate anymore once we decouple the kernel text mapping from the linear mapping, so archs may want to drop the low limit entirely. So allow the minimum to be overridden by setting MIN_MEMBLOCK_ADDR. Acked-by: Mark Rutland Acked-by: Rob Herring Signed-off-by: Ard Biesheuvel --- drivers/of/fdt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 655f79db7899..1f98156f8996 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -976,13 +976,16 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, } #ifdef CONFIG_HAVE_MEMBLOCK +#ifndef MIN_MEMBLOCK_ADDR +#define MIN_MEMBLOCK_ADDR __pa(PAGE_OFFSET) +#endif #ifndef MAX_MEMBLOCK_ADDR #define MAX_MEMBLOCK_ADDR ((phys_addr_t)~0) #endif void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) { - const u64 phys_offset = __pa(PAGE_OFFSET); + const u64 phys_offset = MIN_MEMBLOCK_ADDR; if (!PAGE_ALIGNED(base)) { if (size < PAGE_SIZE - (base & ~PAGE_MASK)) {