From patchwork Mon Nov 16 11:23:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 56578 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1257436lbb; Mon, 16 Nov 2015 03:25:58 -0800 (PST) X-Received: by 10.66.164.233 with SMTP id yt9mr54543002pab.32.1447673157935; Mon, 16 Nov 2015 03:25:57 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id hx5si50084030pbc.82.2015.11.16.03.25.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2015 03:25:57 -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.20150623.gappssmtp.com 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 1ZyHtJ-0002KT-F4; Mon, 16 Nov 2015 11:24:09 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyHt2-000263-Lu for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2015 11:23:55 +0000 Received: by wmww144 with SMTP id w144so114330873wmw.0 for ; Mon, 16 Nov 2015 03:23:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=whjUjENg4/WO9yLj58Bgf8ptCMD9RLZYiK3Kp0sRJ7U=; b=gFPICyvEbq/JNTbTeOBmUsF0pI48Pwi+pze0eUucVySHpnAwEZGuBUY2hPgZbyeWpQ HqcbQ7DsJupZCTEeuNAe7vOY+mnysJuw1wLyjR+k/DEs0PMJLTdfMyE9ESHjQod4UhSQ 6ATr9KhvmzmAkBloR9meThguZhfXb7P/Pyzb7fXNwzndd994u3+5AyRwP7jDKJmMgIXf l4y1OoSibfGluuk21nLeA/5F73JDaU6gwz8eKa+u4tCxp4lw8nRTQNZ15fSHrRvudONy 3O2qdhuaWE93QpotP2YY5jWqyBMJFP8RhpgFSwzcq0dQiHPE4hjdOD6+4HWFjxEyYrjH pgIA== 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=whjUjENg4/WO9yLj58Bgf8ptCMD9RLZYiK3Kp0sRJ7U=; b=DfDnKr+W778cyq2Vp2jgzHyXzrr686UsvX+zuMQqAmy2LY4X+rHQWRzrcW+yPBYx5f oKX6XCfwsnrqXmtqOyBR/vn4mhzm2z0TEqPQhS36xr2r2NrfNw5Lf4rLUMXRFqsSuJog uEJ2S2Cklqt1kCFWdUzFm4Gl1E9RRvnouDhJpro2xxL/qd1r3aMIEwhj7G4nsf1GlVX+ x5Tldq/sZ+nH4gJvoc8BbChi7nFsXyqt9X0lrbd/RuZFVCLNpIzr1Ts2YTSBPsepv6Qe cmlzauj4RUpjnpPbYBf223A8omrdhLyIv7krUImHT8FKpNUaudSavTwo34pQCkNjRDz9 qlyA== X-Gm-Message-State: ALoCoQmvdQ5RvLF6lmhEAu9mQ5gYR06W+DRktPB4jtlkvbbynsDwERdwK9UbBkUo4Od7uwwnobvg X-Received: by 10.28.216.72 with SMTP id p69mr2840159wmg.14.1447673011011; Mon, 16 Nov 2015 03:23:31 -0800 (PST) Received: from localhost.localdomain ([47.53.155.123]) by smtp.gmail.com with ESMTPSA id t126sm18062422wmd.18.2015.11.16.03.23.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Nov 2015 03:23:30 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v3 1/7] of/fdt: make memblock minimum physical address arch configurable Date: Mon, 16 Nov 2015 12:23:12 +0100 Message-Id: <1447672998-20981-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447672998-20981-1-git-send-email-ard.biesheuvel@linaro.org> References: <1447672998-20981-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151116_032353_082576_1D2B67BC X-CRM114-Status: GOOD ( 12.36 ) 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 [2a00:1450:400c:c09:0:0:0:231 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 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 , suzuki.poulose@arm.com, james.morse@arm.com, labbott@fedoraproject.org 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(-) -- 1.9.1 _______________________________________________ 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 d2430298a309..0455564f8cbc 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -971,13 +971,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)) {