]> git.hungrycats.org Git - linux/commitdiff
[PATCH] proper alignment of init task in kernel image
authorAndrew Morton <akpm@osdl.org>
Thu, 18 Mar 2004 22:59:50 +0000 (14:59 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 18 Mar 2004 22:59:50 +0000 (14:59 -0800)
From: Matt Mackall <mpm@selenic.com>

This keeps the alignment of the init task matched with the stack size.

arch/i386/kernel/init_task.c
arch/i386/kernel/vmlinux.lds.S

index 7467ba601211e767e9ec1820a56c5d5931347108..976e6bc1668bcf0b220dccaaa5aca8d1135191db 100644 (file)
@@ -20,7 +20,7 @@ EXPORT_SYMBOL(init_mm);
 /*
  * Initial thread structure.
  *
- * We need to make sure that this is 8192-byte aligned due to the
+ * We need to make sure that this is THREAD_SIZE aligned due to the
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
index 6a92b9d19a4fb0b53c5ebaccaf75f077e6eceb08..3623d7e2934ac59f2d231f965f655fa8248b153c 100644 (file)
@@ -3,7 +3,8 @@
  */
 
 #include <asm-generic/vmlinux.lds.h>
-       
+#include <asm/thread_info.h>
+
 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
 ENTRY(startup_32)
@@ -48,7 +49,7 @@ SECTIONS
 
   _edata = .;                  /* End of data section */
 
-  . = ALIGN(8192);             /* init_task */
+  . = ALIGN(THREAD_SIZE);      /* init_task */
   .data.init_task : { *(.data.init_task) }
 
   /* will be freed after init */