From patchwork Tue Feb 16 12:52:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 62010 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1645315lbl; Tue, 16 Feb 2016 04:54:49 -0800 (PST) X-Received: by 10.66.190.131 with SMTP id gq3mr30348629pac.42.1455627289646; Tue, 16 Feb 2016 04:54:49 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id gq7si14599462pac.217.2016.02.16.04.54.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2016 04:54:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for 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: best guess record for 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 1aVf8P-0008AJ-GI; Tue, 16 Feb 2016 12:53:41 +0000 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVf87-00082B-Ko for linux-arm-kernel@lists.infradead.org; Tue, 16 Feb 2016 12:53:26 +0000 Received: by mail-wm0-x229.google.com with SMTP id g62so151298170wme.0 for ; Tue, 16 Feb 2016 04:53:03 -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=EmsHZjjCeD0tOdsnV/ob63bVM9JzkN+CL4lDOzytLppDPKy5/1FHKuOyurl4tEk/hd oYGVlYs2oyxIsDJB5o3ChzPOuDuCHHECWLkFg+GuArzGxK0hlJW/wYDvrTHEtwmTigue lXJrFdLIGbdFiQj+3sFmocKxwdOLVH7PqFoKA= 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=UqYsw2vy2F9tNoHxdijTAPQGsc5CKEHjgqIrtFalDGyqRcFuIzV0bgCyDTm2etHqHV tUtO6225j9SEUOKR8MHuZsRcW3k3bWiWj1nGByEH24JwH3JLyMatuWcuPoru7qAoKK+8 M+YC0kKpGGv+3GYE9KynAQEOtWbXWZw7F7v1pstGkjRKrb+78pTbbocU3XR/7nTMiaJm hK0kWyU4o8ZLYhsFJ62WzhKSzAQRwo8z4C0KB5DkPrMbBeBjvqY/tRVXUJdWj1MQc1TM 53arYsnb+z0LhfRBLOc2+Fjc7p/KY9/JyMH/cGPTVISx1TEbqmUK9dzhHbTq4msIIcof wGxg== X-Gm-Message-State: AG10YORQQIiPrQSF6uHjQ1RnhqNG2KyjOJzE61ImpfsYNu0UNHq+k1Pi+l7mYAsHHyo/BwDm X-Received: by 10.194.87.161 with SMTP id az1mr22327609wjb.163.1455627181945; Tue, 16 Feb 2016 04:53:01 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id x66sm20454816wmb.20.2016.02.16.04.52.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 04:53:00 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, mark.rutland@arm.com, keescook@chromium.org Subject: [PATCH v6sub1 01/11] of/fdt: make memblock minimum physical address arch configurable Date: Tue, 16 Feb 2016 13:52:32 +0100 Message-Id: <1455627162-31600-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455627162-31600-1-git-send-email-ard.biesheuvel@linaro.org> References: <1455627162-31600-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160216_045324_031147_F2F0D80F X-CRM114-Status: GOOD ( 11.50 ) 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:229 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_VALID_AU Message has a valid DKIM or DK signature from author's domain 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 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: marc.zyngier@arm.com, Ard Biesheuvel , james.morse@arm.com, laurentiu.tudor@nxp.com 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)) {