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

From: Subash Patel
Date: Fri Oct 14 2011 - 00:33:29 EST


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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/