SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n
@ 2015-01-15  6:24 Magnus Damm
  2015-01-15  9:47 ` Geert Uytterhoeven
  2015-01-15  9:51 ` Magnus Damm
  0 siblings, 2 replies; 4+ messages in thread
From: Magnus Damm @ 2015-01-15  6:24 UTC (permalink / raw)
  To: linux-sh

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

Allow R-Car Gen2 platforms to boot with CMA enabled
and HIGHMEM disabled. This patch adds code to check
if the R-Car Gen2 specific memory reservation window
is included in the kernel memory range or not. When
HIGHMEM is disabled the R-Car Gen2 reservation area is
outside the kernel memory range and in such case the
memory reservation is simply skipped over.

Without this patch the kernel boot hangs when CMA is
enabled and HIGHMEM is disabled on the r8a7791 Koelsch
hardware platform.

In the current shmobile_defconfig HIGHMEM is enabled
while CMA is disabled, so to trigger this the kernel
configuration for both CMA and HIGHMEM needs to be
adjusted.

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

 Written on top of renesas-devel-20150114v2-v3.19-rc4

 arch/arm/mach-shmobile/setup-rcar-gen2.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c	2015-01-15 14:20:47.089397114 +0900
@@ -21,6 +21,7 @@
 #include <linux/dma-contiguous.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/memblock.h>
 #include <linux/of.h>
 #include <linux/of_fdt.h>
 #include <asm/mach/arch.h>
@@ -197,7 +198,7 @@ void __init rcar_gen2_reserve(void)
 
 	of_scan_flat_dt(rcar_gen2_scan_mem, &mrc);
 #ifdef CONFIG_DMA_CMA
-	if (mrc.size)
+	if (mrc.size && memblock_is_region_memory(mrc.base, mrc.size))
 		dma_contiguous_reserve_area(mrc.size, mrc.base, 0,
 					    &rcar_gen2_dma_contiguous, true);
 #endif

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [GIT PULL v2] Renesas ARM Based SoC Updates for v4.1
@ 2015-03-03  0:24 Simon Horman
  2015-03-03  0:24 ` [PATCH] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2015-03-03  0:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Olof, Hi Kevin, Hi Arnd,

Please consider these Renesas ARM based SoC updates for v4.1.

This is a revised version of an earlier pull-request with some
patches dropped and other shuffled over to the soc-cleanups branch:
I'll send pull requests for those changes later.


The following changes since commit c517d838eb7d07bbe9507871fab3931deccff539:

  Linux 4.0-rc1 (2015-02-22 18:21:14 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-for-v4.1

for you to fetch changes up to 744cadba1ae6b80b413aea87835855dcccad86fd:

  ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n (2015-02-24 07:13:54 +0900)

----------------------------------------------------------------
Renesas ARM Based SoC Updates for v4.1

* Do not make CMA reservation for R-Car Gen2 when HIGHMEM=n

----------------------------------------------------------------
Magnus Damm (1):
      ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n

 arch/arm/mach-shmobile/setup-rcar-gen2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

end of thread, other threads:[~2015-03-03  0:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15  6:24 [PATCH] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n Magnus Damm
2015-01-15  9:47 ` Geert Uytterhoeven
2015-01-15  9:51 ` Magnus Damm
  -- strict thread matches above, loose matches on Subject: below --
2015-03-03  0:24 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.1 Simon Horman
2015-03-03  0:24 ` [PATCH] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox