Please revert 86c0baf123e474b6eb404798926ecf62b426bf3a
The change:
+#ifdef CONFIG_HOTPLUG_CPU
+#define __INIT .section ".text","ax"
+#define __INITDATA .section ".data","aw"
+#else
#define __INIT .section ".init.text","ax"
-#define __FINIT .previous
#define __INITDATA .section ".init.data","aw"
+#endif
+#define __FINIT .previous
breaks ARM, since the ARM startup code moves from the start of the image to somewhere in the middle of the kernel image. (That's trivially fixable.)
Besides that, this change is also wrong because not all assembly marked __INIT needs to be moved into the standard .text segment when hotplug CPU is enabled. Ditto for __INITDATA.
One is left wondering why the original patch proposers didn't:
1. Invent __CPUINIT and __CPUINITDATA, to be consistent with __init vs __cpuinit.
2. copy other architecture maintainers.
Shall I invent __CPUINIT to mark data to always be thrown away, or are the x86 folk going to withdraw this patch and do it properly?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Review
Quoted 13 lines · Russell King
The change:
(quoted diff) +6
-1+#ifdef CONFIG_HOTPLUG_CPU +#define __INIT .section ".text","ax" +#define __INITDATA .section ".data","aw" +#else #define __INIT .section ".init.text","ax" -#define __FINIT .previous #define __INITDATA .section ".init.data","aw" +#endif +#define __FINIT .previous
Something is not right here.... was this the patch that I submitted? If so then I definitely screwed up pretty badly.
I thought I had done (sorry for the cut-and-paste):
+#ifdef CONFIG_HOTPLUG_CPU
+#define __CPUINIT .section ".text","ax"
+#define __CPUINITDATA .section ".data","aw"
+#else
+#define __CPUINIT __INIT
+#define __CPUINITDATA __INITDATA
+#endif
Maybe some wires got crossed along the submit route... Russell, I'll submit a fix against the latest tree.
P.
Quoted 3 lines · Russell King
Shall I invent
__CPUINITto mark data to always be thrown away, or are the x86 folk going to withdraw this patch and do it properly?
I can certainly revert the patch, but it would probably be better if you were to just start adding the infrastructure you need and send it as a new patch instead (where the revert is part of it, and the __CPUINIT is additional).
Linus
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · Russell King
Shall I invent
__CPUINITto mark data to always be thrown away, or are the x86 folk going to withdraw this patch and do it properly?I can certainly revert the patch, but it would probably be better if you were to just start adding the infrastructure you need and send it as a new patch instead (where the revert is part of it, and the
__CPUINITis additional).
I've sent Russell a new patch to test off-list. He or I will submit a fix here after he tests.
P.
Quoted 2 lines
Linus
Quoted 7 lines · Prarit Bhargava
Quoted 6 lines · Linus Torvalds
Quoted 3 lines · Russell King
Shall I invent
__CPUINITto mark data to always be thrown away, or are the x86 folk going to withdraw this patch and do it properly?
Quoted 7 lines
Quoted 4 lines
I can certainly revert the patch, but it would probably be better if you were to just start adding the infrastructure you need and send it as a new patch instead (where the revert is part of it, and the
__CPUINITis additional).I've sent Russell a new patch to test off-list. He or I will submit a fix here after he tests.
I'm not sure it'd make much sense for me to test it - I don't have x86 based test boxes here.
Assuming your intention is to revert this commit and replace it with your patch which doesn't change the semantics of __INIT, it shouldn't cause me any problems.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 9 lines
I'm not sure it'd make much sense for me to test it - I don't have x86 based test boxes here.
Assuming your intention is to revert this commit and replace it with your patch which doesn't change the semantics of
__INIT, it shouldn't cause me any problems.
Okay -- I'll generate a new patch later this afternoon, test, and submit.
P.
Quoted 12 lines · Russell King
The change:
(quoted diff) +6
-1+#ifdef CONFIG_HOTPLUG_CPU +#define __INIT .section ".text","ax" +#define __INITDATA .section ".data","aw" +#else #define __INIT .section ".init.text","ax" -#define __FINIT .previous #define __INITDATA .section ".init.data","aw" +#endif +#define __FINIT .previous
Quoted 2 lines
breaks ARM, since the ARM startup code moves from the start of the image to somewhere in the middle of the kernel image. (That's trivially fixable.)
Although I've worked around this, I still would like this fixed. Prarit's produced a patch (mail attached) which should fix it, can we get it merged please?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Russell and Andrew,
After examining what was checked in and the code base I discovered that most of 86c0baf123e474b6eb404798926ecf62b426bf3a wasn't necessary anymore....
So here's a patch that reverts the last part of that changeset:
Revert part of 86c0baf123e474b6eb404798926ecf62b426bf3a.
The kernel has moved forward to a state where the original change is not necessary. After porting forward, this final version of the patch was applied and broke non-x86 architectures.
include/linux/init.h +1 -6
@@ -52,14 +52,9 @@#endif /* For assembly routines */ -#ifdef CONFIG_HOTPLUG_CPU -#define __INIT .section ".text","ax" -#define __INITDATA .section ".data","aw" -#else #define __INIT .section ".init.text","ax" -#define __INITDATA .section ".init.data","aw" -#endif #define __FINIT .previous +#define __INITDATA .section ".init.data","aw"#ifndef __ASSEMBLY__/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/