From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] scripts/link-vmlinux.sh: correct base address for some ARM special cases
Date: Wed, 26 Feb 2014 15:06:32 +0100 [thread overview]
Message-ID: <20140226140632.GG6865@pengutronix.de> (raw)
In-Reply-To: <20140226135352.GY21483@n2100.arm.linux.org.uk>
On Wed, Feb 26, 2014 at 01:53:52PM +0000, Russell King - ARM Linux wrote:
> 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:
>
> 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.
This hunk is already in my working copy, too :-)
> @@ -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.
> */
>
> 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...
Looks reasonable. Maybe we can also get rid of PLAT_PHYS_OFFSET then.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2014-02-26 14:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 11:11 [PATCH] scripts/link-vmlinux.sh: correct base address for some ARM special cases Uwe Kleine-König
2014-02-26 11:15 ` Russell King - ARM Linux
2014-02-26 13:46 ` Uwe Kleine-König
2014-02-26 13:53 ` Russell King - ARM Linux
2014-02-26 14:02 ` Arnd Bergmann
2014-02-26 14:06 ` Uwe Kleine-König [this message]
2014-02-26 14:16 ` Arnd Bergmann
2014-02-26 14:18 ` Arnd Bergmann
2014-02-26 14:32 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140226140632.GG6865@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.