linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: Lager memory map update
@ 2014-06-05  6:06 Magnus Damm
  2014-06-05  8:17 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Magnus Damm @ 2014-06-05  6:06 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm+renesas@opensource.se>

Update the Lager DTS to make use of the new unified legacy 
memory map where the legacy window on Lager and Koelsch
have the same size.

After update the Lager board has the following map:
Bank0: 1GiB RAM (Legacy 32-bit: 0x40000000->0x7fffffff)
Bank1: 3GiB RAM (LPAE area: 0x140000000->0x1ffffffff)

Before the update the old map looked like this:
Bank0: 2GiB RAM (Legacy 32-bit: 0x40000000->0xbfffffff)
Bank1: 2GiB RAM (LPAE area: 0x180000000->0x1ffffffff)

Tested with and without LPAE on r8a7790 Lager.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 Written against renesas-devel-v3.15-rc8-20140605

 arch/arm/boot/dts/r8a7790-lager.dts |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 0001/arch/arm/boot/dts/r8a7790-lager.dts
+++ work/arch/arm/boot/dts/r8a7790-lager.dts	2014-06-05 14:49:42.000000000 +0900
@@ -29,12 +29,12 @@
 
 	memory@40000000 {
 		device_type = "memory";
-		reg = <0 0x40000000 0 0x80000000>;
+		reg = <0 0x40000000 0 0x40000000>;
 	};
 
 	memory@180000000 {
 		device_type = "memory";
-		reg = <1 0x80000000 0 0x80000000>;
+		reg = <1 0x40000000 0 0xc0000000>;
 	};
 
 	lbsc {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: shmobile: Lager memory map update
  2014-06-05  6:06 [PATCH] ARM: shmobile: Lager memory map update Magnus Damm
@ 2014-06-05  8:17 ` Geert Uytterhoeven
  2014-06-05 21:24 ` Magnus Damm
  2014-06-06  6:25 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-06-05  8:17 UTC (permalink / raw)
  To: linux-sh

Hi Magnus,

On Thu, Jun 5, 2014 at 8:06 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Update the Lager DTS to make use of the new unified legacy
> memory map where the legacy window on Lager and Koelsch
> have the same size.
>
> After update the Lager board has the following map:
> Bank0: 1GiB RAM (Legacy 32-bit: 0x40000000->0x7fffffff)
> Bank1: 3GiB RAM (LPAE area: 0x140000000->0x1ffffffff)
>
> Before the update the old map looked like this:
> Bank0: 2GiB RAM (Legacy 32-bit: 0x40000000->0xbfffffff)
> Bank1: 2GiB RAM (LPAE area: 0x180000000->0x1ffffffff)
>
> Tested with and without LPAE on r8a7790 Lager.
>
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

I think this lacks an explanation why you want this...

In general, less highmem is better ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: shmobile: Lager memory map update
  2014-06-05  6:06 [PATCH] ARM: shmobile: Lager memory map update Magnus Damm
  2014-06-05  8:17 ` Geert Uytterhoeven
@ 2014-06-05 21:24 ` Magnus Damm
  2014-06-06  6:25 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2014-06-05 21:24 UTC (permalink / raw)
  To: linux-sh

Hi Geert,

On Thu, Jun 5, 2014 at 5:17 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Thu, Jun 5, 2014 at 8:06 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> From: Magnus Damm <damm+renesas@opensource.se>
>>
>> Update the Lager DTS to make use of the new unified legacy
>> memory map where the legacy window on Lager and Koelsch
>> have the same size.
>>
>> After update the Lager board has the following map:
>> Bank0: 1GiB RAM (Legacy 32-bit: 0x40000000->0x7fffffff)
>> Bank1: 3GiB RAM (LPAE area: 0x140000000->0x1ffffffff)
>>
>> Before the update the old map looked like this:
>> Bank0: 2GiB RAM (Legacy 32-bit: 0x40000000->0xbfffffff)
>> Bank1: 2GiB RAM (LPAE area: 0x180000000->0x1ffffffff)
>>
>> Tested with and without LPAE on r8a7790 Lager.
>>
>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
> I think this lacks an explanation why you want this...

The reason is that the legacy portion of the memory map (what is
included in the 32-bit space) should be unified between Lager and
Koelsch. I've been asked to do this, and I suspect it is related to
simplify u-boot board support. It is not however 100% clear to me. Now
the memory map will at least match documentation.

> In general, less highmem is better ;-)

Well, yes, that I agree to. But in this particular case with the
common 3G/1G user/kernel virtual memory split the amount of highmem
actually remains the same. =) From highmem/lowmem perspective this
patch simply takes 1GiB of highmem from the legacy window and moves it
into the LPAE area that also is accessed as highmem. LPAE needs to be
enabled to get all the memory though, but that was needed before
anyway. So this patch really makes no big difference when 3G/1G is
used.

However for other split mode like 2G/2G the amount of potential lowmem
is reduced. It is however my understanding that this split mode is
however incompatible with the USB Host controllers. Also, on Lager
regardless how you adjust your split mode you need to enable LPAE to
get access to all memory.

Cheers,

/ magnus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: shmobile: Lager memory map update
  2014-06-05  6:06 [PATCH] ARM: shmobile: Lager memory map update Magnus Damm
  2014-06-05  8:17 ` Geert Uytterhoeven
  2014-06-05 21:24 ` Magnus Damm
@ 2014-06-06  6:25 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2014-06-06  6:25 UTC (permalink / raw)
  To: linux-sh

On Fri, Jun 06, 2014 at 06:24:07AM +0900, Magnus Damm wrote:
> Hi Geert,
> 
> On Thu, Jun 5, 2014 at 5:17 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Hi Magnus,
> >
> > On Thu, Jun 5, 2014 at 8:06 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> >> From: Magnus Damm <damm+renesas@opensource.se>
> >>
> >> Update the Lager DTS to make use of the new unified legacy
> >> memory map where the legacy window on Lager and Koelsch
> >> have the same size.
> >>
> >> After update the Lager board has the following map:
> >> Bank0: 1GiB RAM (Legacy 32-bit: 0x40000000->0x7fffffff)
> >> Bank1: 3GiB RAM (LPAE area: 0x140000000->0x1ffffffff)
> >>
> >> Before the update the old map looked like this:
> >> Bank0: 2GiB RAM (Legacy 32-bit: 0x40000000->0xbfffffff)
> >> Bank1: 2GiB RAM (LPAE area: 0x180000000->0x1ffffffff)
> >>
> >> Tested with and without LPAE on r8a7790 Lager.
> >>
> >> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> >
> > I think this lacks an explanation why you want this...
> 
> The reason is that the legacy portion of the memory map (what is
> included in the 32-bit space) should be unified between Lager and
> Koelsch. I've been asked to do this, and I suspect it is related to
> simplify u-boot board support. It is not however 100% clear to me. Now
> the memory map will at least match documentation.

I think it would be best if some reason was included in the changelog.
I am willing to accept "align code with documentation" at a minimum.
But something more verbose may aid us when looking over this again
in the future.

> 
> > In general, less highmem is better ;-)
> 
> Well, yes, that I agree to. But in this particular case with the
> common 3G/1G user/kernel virtual memory split the amount of highmem
> actually remains the same. =) From highmem/lowmem perspective this
> patch simply takes 1GiB of highmem from the legacy window and moves it
> into the LPAE area that also is accessed as highmem. LPAE needs to be
> enabled to get all the memory though, but that was needed before
> anyway. So this patch really makes no big difference when 3G/1G is
> used.
> 
> However for other split mode like 2G/2G the amount of potential lowmem
> is reduced. It is however my understanding that this split mode is
> however incompatible with the USB Host controllers. Also, on Lager
> regardless how you adjust your split mode you need to enable LPAE to
> get access to all memory.
> 
> Cheers,
> 
> / magnus
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-06  6:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-05  6:06 [PATCH] ARM: shmobile: Lager memory map update Magnus Damm
2014-06-05  8:17 ` Geert Uytterhoeven
2014-06-05 21:24 ` Magnus Damm
2014-06-06  6:25 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).