From 356ae72a448b1dc6843b0f864edc861b26643320 Mon Sep 17 00:00:00 2001 From: Arnaud Patard Date: Tue, 13 Dec 2011 08:15:07 +0000 Subject: [PATCH] Add arm_dma_zone_size fix as it should fix #651215 svn path=/dists/sid/linux-2.6/; revision=18385 --- debian/changelog | 3 ++ .../patches/bugfix/arm/nslu2-dma-size.patch | 40 +++++++++++++++++++ debian/patches/series/base | 1 + 3 files changed, 44 insertions(+) create mode 100644 debian/patches/bugfix/arm/nslu2-dma-size.patch diff --git a/debian/changelog b/debian/changelog index b2532f7e9..8d911c0c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ linux-2.6 (3.1.5-2) UNRELEASED; urgency=low [ Ben Hutchings ] * staging: r8712u: Add new USB ID (Closes: #651622) + [ Arnaud Patard ] + * arm: add arm_dma_zone_size setting fixe + -- Ben Hutchings Tue, 13 Dec 2011 05:50:44 +0000 linux-2.6 (3.1.5-1) unstable; urgency=low diff --git a/debian/patches/bugfix/arm/nslu2-dma-size.patch b/debian/patches/bugfix/arm/nslu2-dma-size.patch new file mode 100644 index 000000000..4a9f6e3b6 --- /dev/null +++ b/debian/patches/bugfix/arm/nslu2-dma-size.patch @@ -0,0 +1,40 @@ +Queued as http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7204%2F1 + +arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier + +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 +Acked-by: Nicolas Pitre +CC: stable@kernel.org +Index: linux-2.6/arch/arm/kernel/setup.c +=================================================================== +--- linux-2.6.orig/arch/arm/kernel/setup.c 2011-12-11 17:48:29.000000000 +0100 ++++ linux-2.6/arch/arm/kernel/setup.c 2011-12-11 17:57:03.000000000 +0100 +@@ -904,6 +904,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"); + +@@ -934,12 +940,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 diff --git a/debian/patches/series/base b/debian/patches/series/base index 7b4b34a6d..8f77c25d0 100644 --- a/debian/patches/series/base +++ b/debian/patches/series/base @@ -87,3 +87,4 @@ + bugfix/all/0005-staging-brcm80211-restrict-MIPS-dma-bug-workaround-t.patch + debian/inetpeer-hide-ABI-change-in-3.1.5.patch + features/all/staging-r8712u-Add-new-USB-ID.patch ++ bugfix/arm/nslu2-dma-size.patch