From patchwork Wed Feb 26 13:46:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 3724191 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 EE09C9F35F for ; Wed, 26 Feb 2014 13:51:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2326E2017B for ; Wed, 26 Feb 2014 13:51:33 +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 1EF7B20173 for ; Wed, 26 Feb 2014 13:51:32 +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 1WIepG-00041d-8h; Wed, 26 Feb 2014 13:47:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIeol-0007TJ-0A; Wed, 26 Feb 2014 13:46:35 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIeoh-0007Ry-UN for linux-arm-kernel@lists.infradead.org; Wed, 26 Feb 2014 13:46:32 +0000 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WIeoK-0005PJ-Fk; Wed, 26 Feb 2014 14:46:08 +0100 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.82) (envelope-from ) id 1WIeoH-00011N-SX; Wed, 26 Feb 2014 14:46:05 +0100 Date: Wed, 26 Feb 2014 14:46:05 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Russell King - ARM Linux Subject: Re: [PATCH] scripts/link-vmlinux.sh: correct base address for some ARM special cases Message-ID: <20140226134605.GF6865@pengutronix.de> References: <1393413080-26942-1-git-send-email-u.kleine-koenig@pengutronix.de> <20140226111507.GW21483@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140226111507.GW21483@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140226_084632_328164_3CCEEEB7 X-CRM114-Status: GOOD ( 23.46 ) X-Spam-Score: -1.9 (-) 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 11:15:07AM +0000, Russell King - ARM Linux wrote: > On Wed, Feb 26, 2014 at 12:11:20PM +0100, Uwe Kleine-König wrote: > > The toolchain problem described in commit f6537f2f0eba > > (scripts/kallsyms: filter symbols not in kernel address space) makes it > > necessary to filter out some kernel symbols from /proc/kallsyms to make > > perf happy. > > > > For that to work correctly the address used to filter should be just > > below the kernel text segment. Depending on kernel configuration > > CONFIG_PAGE_OFFSET is not the right address to use. See the comments > > introduced by this commit for the glory details. > > Is there any reason why PAGE_OFFSET should not be DRAM_BASE for nommu? Nothing I'm aware of[1]. Talking to Arnd earlier today on irc: 1393409816 < ukleinek> arnd: PAGE_OFFSET doesn't make much sense on !MMU, does it? 1393409828 < arnd> no 1393409844 < arnd> but I think we just set it to PHYS_OFFSET normally 1393409864 < arnd> which does the right thing, except with XIP_KERNEL, where the kernel doesn't actually run from RAM PAGE_OFFSET is only set to PLAT_PHYS_OFFSET (for !MMU) in arch/arm/include/asm/memory.h which in turn is set to CONFIG_PHYS_OFFSET which is: hex "Physical address of main memory" if MMU ... default DRAM_BASE if !MMU So yes, I think we can do: and then drop the MMU case in the patch that is discussed here and also simplify a few other locations. I'll test a bit with this and then send it out with a few other fixes I have in the queue. For stable I'd still suggest not to do this though but stick to the original patch that started this thread. Best regards Uwe [1] maybe apart from being only one of serveral things that could be improved for !MMU. 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