Skip to contentSkip to conversation

arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier

PATCH New Arnaud Patard (Rtp) 2 participants 4 messages Dec 8, 2011 – Dec 11, 2011

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier

Quoted 6 lines · Arnaud Patard

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.

CC stable at kernel.org

Don't _actually_ send stuff to the stable team until it's in mainline, otherwise you'll get a complaint from them. See Documentation/stable_kernel_rules.txt. (I'm leaving the stable cc there so they know that this has already been said.)

Apart from that the patch looks fine to me.

#2 lore raw

PATCH 1/1 arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier

In reply to Arnaud Patard (Rtp)
Quoted 12 lines · Arnaud Patard

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.

CC stable at kernel.org

Index: linux-2.6/arch/arm/kernel/setup.c
===================================================================

arch/arm/kernel/setup.c +0 -0
@@ -911,6 +911,12 @@ void __init setup_arch(char **cmdline_p)
 	machine_desc = mdesc;

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 921

Quoted 10 lines
arch/arm/kernel/setup.c +6 -0
 	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->restart_mode)
 		reboot_setup(&mdesc->restart_mode);

Just trying to apply this patch, it won't apply to mainline because it's based upon the bleeding edge of kernel development, rather than what's currently in mainline. If we're going to fix this in current mainline and previous stable versions, the patch needs to be against that, not linux-next.

Could you re-generate against an -rc kernel please?

#3 lore raw

PATCH 1/1 arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier

Russell King - ARM Linux <[email protected]> writes:

Hi,

Quoted 30 lines · Arnaud Patard
Quoted 12 lines

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.

CC stable at kernel.org

Index: linux-2.6/arch/arm/kernel/setup.c
===================================================================

arch/arm/kernel/setup.c +0 -0
@@ -911,6 +911,12 @@ void __init setup_arch(char **cmdline_p)
 	machine_desc = mdesc;

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 921

Quoted 10 lines
arch/arm/kernel/setup.c +6 -0
 	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->restart_mode)
 		reboot_setup(&mdesc->restart_mode);

Just trying to apply this patch, it won't apply to mainline because it's based upon the bleeding edge of kernel development, rather than what's currently in mainline. If we're going to fix this in current mainline and previous stable versions, the patch needs to be against that, not linux-next.

Quoted 1 line

Could you re-generate against an -rc kernel please?

Ok. No problem. Done. It's the patch 7204/1 in the patch system.

Arnaud