All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support
@ 2014-06-09 12:38 Magnus Damm
  2014-06-10  1:37 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Magnus Damm @ 2014-06-09 12:38 UTC (permalink / raw)
  To: linux-sh

ARM: shmobile: R-car Gen2 CMA reservation support

[PATCH 01/02] ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
[PATCH 02/02] ARM: shmobile: Enable R-Car Gen2 CMA code in board files

These patches add CMA reservation code for R-Car Gen2 SoCs and boards.

Instead of using custom memory reservation hacks for demos and other
things, make use of standard CMA to reserve a pool of memory. This memory
is suitable for devices that take physically contiguous memory such as
DU and VSP1 multimedia devices. At this point no device assignment is
included - only memory reservation code is added for now.

All R-Car Gen2 SoCs so far have LPAE support and boards tend to use more
than 32-bits of physical addresses to access the system memory. These
patches add code that during run time parses the DT memory banks and nick
256MiB from the highest memory bank within the legacy 32-bit physical memory
space and use that for CMA.

On Lager and Koelsch boards these 256 MiB is at 0x7000000 -> 0x7fffffff.

The code uses dynamic calculation of the CMA area base address over static
DT reservation since this kind of configuration is based on software policy.
DT is however still used to describe the system memory banks as expected.
Software memory partitioning is excluded from DT by design.

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

 Written on top of renesas-devel-v3.15-20140609v2

 arch/arm/mach-shmobile/board-koelsch-reference.c |    1 
 arch/arm/mach-shmobile/board-koelsch.c           |    1 
 arch/arm/mach-shmobile/board-lager-reference.c   |    1 
 arch/arm/mach-shmobile/board-lager.c             |    1 
 arch/arm/mach-shmobile/include/mach/rcar-gen2.h  |    1 
 arch/arm/mach-shmobile/setup-r8a7790.c           |    1 
 arch/arm/mach-shmobile/setup-r8a7791.c           |    1 
 arch/arm/mach-shmobile/setup-rcar-gen2.c         |   79 ++++++++++++++++++++++
 8 files changed, 86 insertions(+)


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

* Re: [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support
  2014-06-09 12:38 [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support Magnus Damm
@ 2014-06-10  1:37 ` Simon Horman
  2014-06-10  4:10 ` Magnus Damm
  2014-06-10  6:57 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2014-06-10  1:37 UTC (permalink / raw)
  To: linux-sh

On Mon, Jun 09, 2014 at 09:38:37PM +0900, Magnus Damm wrote:
> ARM: shmobile: R-car Gen2 CMA reservation support
> 
> [PATCH 01/02] ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
> [PATCH 02/02] ARM: shmobile: Enable R-Car Gen2 CMA code in board files
> 
> These patches add CMA reservation code for R-Car Gen2 SoCs and boards.
> 
> Instead of using custom memory reservation hacks for demos and other
> things, make use of standard CMA to reserve a pool of memory. This memory
> is suitable for devices that take physically contiguous memory such as
> DU and VSP1 multimedia devices. At this point no device assignment is
> included - only memory reservation code is added for now.
> 
> All R-Car Gen2 SoCs so far have LPAE support and boards tend to use more
> than 32-bits of physical addresses to access the system memory. These
> patches add code that during run time parses the DT memory banks and nick
> 256MiB from the highest memory bank within the legacy 32-bit physical memory
> space and use that for CMA.
> 
> On Lager and Koelsch boards these 256 MiB is at 0x7000000 -> 0x7fffffff.
> 
> The code uses dynamic calculation of the CMA area base address over static
> DT reservation since this kind of configuration is based on software policy.
> DT is however still used to describe the system memory banks as expected.
> Software memory partitioning is excluded from DT by design.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Hi Magnus,

this seems clean to me. Shall I queue it up?

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

* Re: [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support
  2014-06-09 12:38 [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support Magnus Damm
  2014-06-10  1:37 ` Simon Horman
@ 2014-06-10  4:10 ` Magnus Damm
  2014-06-10  6:57 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2014-06-10  4:10 UTC (permalink / raw)
  To: linux-sh

Hi Simon,

On Tue, Jun 10, 2014 at 10:37 AM, Simon Horman <horms@verge.net.au> wrote:
> On Mon, Jun 09, 2014 at 09:38:37PM +0900, Magnus Damm wrote:
>> ARM: shmobile: R-car Gen2 CMA reservation support
>>
>> [PATCH 01/02] ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
>> [PATCH 02/02] ARM: shmobile: Enable R-Car Gen2 CMA code in board files
>>
>> These patches add CMA reservation code for R-Car Gen2 SoCs and boards.
>>
>> Instead of using custom memory reservation hacks for demos and other
>> things, make use of standard CMA to reserve a pool of memory. This memory
>> is suitable for devices that take physically contiguous memory such as
>> DU and VSP1 multimedia devices. At this point no device assignment is
>> included - only memory reservation code is added for now.
>>
>> All R-Car Gen2 SoCs so far have LPAE support and boards tend to use more
>> than 32-bits of physical addresses to access the system memory. These
>> patches add code that during run time parses the DT memory banks and nick
>> 256MiB from the highest memory bank within the legacy 32-bit physical memory
>> space and use that for CMA.
>>
>> On Lager and Koelsch boards these 256 MiB is at 0x7000000 -> 0x7fffffff.
>>
>> The code uses dynamic calculation of the CMA area base address over static
>> DT reservation since this kind of configuration is based on software policy.
>> DT is however still used to describe the system memory banks as expected.
>> Software memory partitioning is excluded from DT by design.
>>
>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
> Hi Magnus,
>
> this seems clean to me. Shall I queue it up?

Thanks, yes please queue up!

/ magnus

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

* Re: [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support
  2014-06-09 12:38 [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support Magnus Damm
  2014-06-10  1:37 ` Simon Horman
  2014-06-10  4:10 ` Magnus Damm
@ 2014-06-10  6:57 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2014-06-10  6:57 UTC (permalink / raw)
  To: linux-sh

On Tue, Jun 10, 2014 at 01:10:39PM +0900, Magnus Damm wrote:
> Hi Simon,
> 
> On Tue, Jun 10, 2014 at 10:37 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Mon, Jun 09, 2014 at 09:38:37PM +0900, Magnus Damm wrote:
> >> ARM: shmobile: R-car Gen2 CMA reservation support
> >>
> >> [PATCH 01/02] ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
> >> [PATCH 02/02] ARM: shmobile: Enable R-Car Gen2 CMA code in board files
> >>
> >> These patches add CMA reservation code for R-Car Gen2 SoCs and boards.
> >>
> >> Instead of using custom memory reservation hacks for demos and other
> >> things, make use of standard CMA to reserve a pool of memory. This memory
> >> is suitable for devices that take physically contiguous memory such as
> >> DU and VSP1 multimedia devices. At this point no device assignment is
> >> included - only memory reservation code is added for now.
> >>
> >> All R-Car Gen2 SoCs so far have LPAE support and boards tend to use more
> >> than 32-bits of physical addresses to access the system memory. These
> >> patches add code that during run time parses the DT memory banks and nick
> >> 256MiB from the highest memory bank within the legacy 32-bit physical memory
> >> space and use that for CMA.
> >>
> >> On Lager and Koelsch boards these 256 MiB is at 0x7000000 -> 0x7fffffff.
> >>
> >> The code uses dynamic calculation of the CMA area base address over static
> >> DT reservation since this kind of configuration is based on software policy.
> >> DT is however still used to describe the system memory banks as expected.
> >> Software memory partitioning is excluded from DT by design.
> >>
> >> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> >
> > Hi Magnus,
> >
> > this seems clean to me. Shall I queue it up?
> 
> Thanks, yes please queue up!

Thanks, done.

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09 12:38 [PATCH 00/02] ARM: shmobile: R-car Gen2 CMA reservation support Magnus Damm
2014-06-10  1:37 ` Simon Horman
2014-06-10  4:10 ` Magnus Damm
2014-06-10  6:57 ` Simon Horman

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.