Skip to content

Commit

Permalink
ARM: 7204/1: arch/arm/kernel/setup.c: initialize arm_dma_zone_size ea…
Browse files Browse the repository at this point in the history
…rlier

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>
  • Loading branch information
Arnaud Patard authored and Russell King committed Dec 11, 2011
1 parent 6bd0540 commit 9811ccd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9811ccd

Please sign in to comment.