Re: [patch] Re: Kernels > 2.6.1-mm3 do not boot. - SOLVED

Andi Kleen
2004-01-27T22:31:49Z

> I've moved the enabling of -funit-at-a-time out of Makefile and down into
> arch/i386/Makefile, and I changed to require gcc-3.4 or higher.
>
> So if you want to use -funit-at-a-time on gcc-3.3/hammer you can do so.

Please undo that and apply this patch instead. It fixes the bug that
broke booting with older gcc 3.3-hammer compilers (confirmed by
two people on l-k). It was plain luck that it worked with the other
compilers.

-Andi

diff -u linux-2.6.2rc1mm3-test/arch/i386/kernel/process.c-o linux-2.6.2rc1mm3-test/arch/i386/kernel/process.c
--- linux-2.6.2rc1mm3-test/arch/i386/kernel/process.c-o 2004-01-27 02:26:39.000000000 +0100
+++ linux-2.6.2rc1mm3-test/arch/i386/kernel/process.c 2004-01-27 19:09:41.131460832 +0100
@@ -253,13 +253,15 @@
* the "args".
*/
extern void kernel_thread_helper(void);
-__asm__(".align 4\n"
+__asm__(".section .text\n"
+ ".align 4\n"
"kernel_thread_helper:\n\t"
"movl %edx,%eax\n\t"
"pushl %edx\n\t"
"call *%ebx\n\t"
"pushl %eax\n\t"
- "call do_exit");
+ "call do_exit\n"
+ ".previous");

/*
* Create a kernel thread