]> git.hungrycats.org Git - linux/commitdiff
[PATCH] use noinline for rest_init()
authorAndrew Morton <akpm@osdl.org>
Thu, 19 Feb 2004 00:38:29 +0000 (16:38 -0800)
committerDavid S. Miller <davem@nuts.davemloft.net>
Thu, 19 Feb 2004 00:38:29 +0000 (16:38 -0800)
gcc-3.4 incorretly inlines rest_init() into start_kernel(), causing things to
crash when the .text.init section gets unloaded.  Use noinline to prevent
that.

init/main.c

index eebe5302bbb208676f8c8cf21699e59299baa76d..8e9645e6354681ab3fe71d13f589c08c25ebc690 100644 (file)
@@ -378,9 +378,11 @@ static void __init smp_init(void)
  * between the root thread and the init thread may cause start_kernel to
  * be reaped by free_initmem before the root thread has proceeded to
  * cpu_idle.
+ *
+ * gcc-3.4 accidentally inlines this function, so use noinline.
  */
 
-static void rest_init(void)
+static void noinline rest_init(void)
 {
        kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND);
        unlock_kernel();