summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/dma.h
diff options
context:
space:
mode:
authorNicolas Pitre2011-07-18 21:05:10 +0200
committerNicolas Pitre2011-07-18 21:29:41 +0200
commit650320181a08b64d4421c65c639cf47ad8cc2cd6 (patch)
tree5458b989faf4dd0a1216e07da3a76d9d30885c03 /arch/arm/include/asm/dma.h
parentARM: dma: replace ISA_DMA_THRESHOLD with a variable (diff)
downloadkernel-qcow2-linux-650320181a08b64d4421c65c639cf47ad8cc2cd6.tar.gz
kernel-qcow2-linux-650320181a08b64d4421c65c639cf47ad8cc2cd6.tar.xz
kernel-qcow2-linux-650320181a08b64d4421c65c639cf47ad8cc2cd6.zip
ARM: change ARM_DMA_ZONE_SIZE into a variable
Having this value defined at compile time prevents multiple machines with conflicting definitions to coexist. Move it to a variable in preparation for having a per machine value selected at run time. This is relevant only when CONFIG_ZONE_DMA is selected. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/dma.h')
-rw-r--r--arch/arm/include/asm/dma.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index 42005542932b..fcf15de8cadb 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -6,10 +6,13 @@
/*
* This is the maximum virtual address which can be DMA'd from.
*/
-#ifndef ARM_DMA_ZONE_SIZE
-#define MAX_DMA_ADDRESS 0xffffffff
+#ifndef CONFIG_ZONE_DMA
+#define MAX_DMA_ADDRESS 0xffffffffUL
#else
-#define MAX_DMA_ADDRESS (PAGE_OFFSET + ARM_DMA_ZONE_SIZE)
+#define MAX_DMA_ADDRESS ({ \
+ extern unsigned long arm_dma_zone_size; \
+ arm_dma_zone_size ? \
+ (PAGE_OFFSET + arm_dma_zone_size) : 0xffffffffUL; })
#endif
#ifdef CONFIG_ISA_DMA_API