Re: [Linaro-mm-sig] [PATCH 8/9] ARM: integrate CMA with DMA-mapping subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marek,

As informed to you in private over IRC, below piece of code broke during booting EXYNOS4:SMDKV310 with ZONE_DMA enabled.


On 10/06/2011 07:24 PM, Marek Szyprowski wrote:
...
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index fbdd12e..9c27fbd 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -21,6 +21,7 @@
  #include<linux/gfp.h>
  #include<linux/memblock.h>
  #include<linux/sort.h>
+#include<linux/dma-contiguous.h>

  #include<asm/mach-types.h>
  #include<asm/prom.h>
@@ -371,6 +372,13 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
  	if (mdesc->reserve)
  		mdesc->reserve();

+	/* reserve memory for DMA contigouos allocations */
+#ifdef CONFIG_ZONE_DMA
+	dma_contiguous_reserve(PHYS_OFFSET + mdesc->dma_zone_size - 1);
+#else
+	dma_contiguous_reserve(0);
+#endif
+
  	memblock_analyze();
  	memblock_dump_all();
  }
Regards,
Subash

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]