From patchwork Wed Feb 26 13:53:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 3724221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90D309F35F for ; Wed, 26 Feb 2014 13:54:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B52532016C for ; Wed, 26 Feb 2014 13:54:30 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBCEA200D6 for ; Wed, 26 Feb 2014 13:54:29 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIewM-0006oO-5s; Wed, 26 Feb 2014 13:54:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIewJ-0007pm-Kf; Wed, 26 Feb 2014 13:54:23 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIewG-0007oR-A0 for linux-arm-kernel@lists.infradead.org; Wed, 26 Feb 2014 13:54:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora; h=Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=h87bygbu2Y9VC58gVMRUkUtwySPHzZYzLpS1NGKyqGM=; b=JlG5/jkNx0tyKy7A92Bqqpa2Rckp0FrRjysM0QYldcktfYIC3xwa/Vz9YEnv5SjPpRpRF5bkYnFhm5oizMQHZyXaI5J6XdRcmyQ4rkTshZHtDcP+p4OuTUjck4dtYuB3rHQHOfItAXkRBAtzkbQAD4O4U7Mau2LYcjsRHWjOnf8=; Received: from n2100.arm.linux.org.uk ([fd8f:7570:feb6:1:214:fdff:fe10:4f86]:40529) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1WIevq-0001YM-LM; Wed, 26 Feb 2014 13:53:54 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1WIevp-0006q8-8r; Wed, 26 Feb 2014 13:53:53 +0000 Date: Wed, 26 Feb 2014 13:53:52 +0000 From: Russell King - ARM Linux To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH] scripts/link-vmlinux.sh: correct base address for some ARM special cases Message-ID: <20140226135352.GY21483@n2100.arm.linux.org.uk> References: <1393413080-26942-1-git-send-email-u.kleine-koenig@pengutronix.de> <20140226111507.GW21483@n2100.arm.linux.org.uk> <20140226134605.GF6865@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140226134605.GF6865@pengutronix.de> User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140226_085420_743993_536558DE X-CRM114-Status: GOOD ( 12.85 ) X-Spam-Score: -2.0 (--) Cc: Arnd Bergmann , Ming Lei , Rusty Russell , stable@vger.kernel.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Feb 26, 2014 at 02:46:05PM +0100, Uwe Kleine-König wrote: > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1595,6 +1595,7 @@ endchoice > > config PAGE_OFFSET > hex > + default DRAM_BASE if !MMU > default 0x40000000 if VMSPLIT_1G > default 0x80000000 if VMSPLIT_2G > default 0xC0000000 I'd prefer this actually: It's more to the point. The first hunk hides the "Memory split" option which is irrelevent on !MMU. We already know that PAGE_OFFSET should be the same as PHYS_OFFSET for noMMU, so let's make that explicit. Note that it already is by way of the bit in the last hunk - which as a result of this change can now be removed... especially so as we have nothing defining PAGE_OFFSET in arch/arm/*/include... diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 24d65aae0491..09289d7b7f68 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1593,6 +1593,7 @@ config BL_SWITCHER_DUMMY_IF choice prompt "Memory split" + depends on MMU default VMSPLIT_3G help Select the desired split between kernel and user memory. @@ -1610,6 +1611,7 @@ endchoice config PAGE_OFFSET hex + default PHYS_OFFSET if !MMU default 0x40000000 if VMSPLIT_1G default 0x80000000 if VMSPLIT_2G default 0xC0000000 diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 8756e4bcdba0..5ccc4a627192 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -104,10 +104,6 @@ #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) #endif -#ifndef PAGE_OFFSET -#define PAGE_OFFSET PLAT_PHYS_OFFSET -#endif - /* * The module can be at any place in ram in nommu mode. */