aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/init.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-07-08 16:26:59 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-12 06:08:12 -0400
commit022ae537b23cb14a391565e9ad9e9945f4b17138 (patch)
treee167c03036fcc09d7131fa364efa70c9e3d5b92a /arch/arm/mm/init.c
parent3973c337759cd201773a0ecc7b6f39f1ea2a6287 (diff)
ARM: dma: replace ISA_DMA_THRESHOLD with a variable
ISA_DMA_THRESHOLD has been unused by non-arch code, so lets now get rid of it from ARM by replacing it with arm_dma_zone_mask. Move dma_supported() and dma_set_mask() out of line, and have dma_supported() check this new variable instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r--arch/arm/mm/init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index c19571c40a21..17d6cd0c57ed 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -212,6 +212,14 @@ static void __init arm_bootmem_init(unsigned long start_pfn,
212} 212}
213 213
214#ifdef CONFIG_ZONE_DMA 214#ifdef CONFIG_ZONE_DMA
215/*
216 * The DMA mask corresponding to the maximum bus address allocatable
217 * using GFP_DMA. The default here places no restriction on DMA
218 * allocations. This must be the smallest DMA mask in the system,
219 * so a successful GFP_DMA allocation will always satisfy this.
220 */
221u32 arm_dma_limit;
222
215static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole, 223static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole,
216 unsigned long dma_size) 224 unsigned long dma_size)
217{ 225{
@@ -278,6 +286,8 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low,
278 */ 286 */
279 arm_adjust_dma_zone(zone_size, zhole_size, 287 arm_adjust_dma_zone(zone_size, zhole_size,
280 ARM_DMA_ZONE_SIZE >> PAGE_SHIFT); 288 ARM_DMA_ZONE_SIZE >> PAGE_SHIFT);
289
290 arm_dma_limit = PHYS_OFFSET + ARM_DMA_ZONE_SIZE - 1;
281#endif 291#endif
282 292
283 free_area_init_node(0, zone_size, min, zhole_size); 293 free_area_init_node(0, zone_size, min, zhole_size);