ARM: 7204/1: arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier
authorArnaud Patard <arnaud.patard@rtp-net.org>
Sun, 11 Dec 2011 19:32:25 +0000 (20:32 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 11 Dec 2011 22:42:01 +0000 (22:42 +0000)
arm_dma_zone_size is used by arm_bootmem_free() which is called by
paging_init(). Thus it needs to be set before calling it.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/setup.c

index 1bdd0adbb7dd2ff697a22de0e1189d3024b40904..8fc2c8fcbdc646a4a8babecbf4a758f88e6d8d60 100644 (file)
@@ -902,6 +902,12 @@ void __init setup_arch(char **cmdline_p)
        machine_desc = mdesc;
        machine_name = mdesc->name;
 
+#ifdef CONFIG_ZONE_DMA
+       if (mdesc->dma_zone_size) {
+               extern unsigned long arm_dma_zone_size;
+               arm_dma_zone_size = mdesc->dma_zone_size;
+       }
+#endif
        if (mdesc->soft_reboot)
                reboot_setup("s");
 
@@ -932,12 +938,6 @@ void __init setup_arch(char **cmdline_p)
 
        tcm_init();
 
-#ifdef CONFIG_ZONE_DMA
-       if (mdesc->dma_zone_size) {
-               extern unsigned long arm_dma_zone_size;
-               arm_dma_zone_size = mdesc->dma_zone_size;
-       }
-#endif
 #ifdef CONFIG_MULTI_IRQ_HANDLER
        handle_arch_irq = mdesc->handle_irq;
 #endif
This page took 0.029173 seconds and 5 git commands to generate.