[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Jun 2009 10:31:29 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: James Bottomley <James.Bottomley@...senPartnership.com>,
Pekka Enberg <penberg@...helsinki.fi>,
linux-kernel <linux-kernel@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, Sachin Sant <sachinp@...ibm.com>
Subject: [PATCH] mm/init: cpu_hotplug_init() must be initialized before SLAB
SLAB uses get/put_online_cpus() which use a mutex which is itself
only initialized when cpu_hotplug_init() is called. Currently
we hang suring boot in SLAB due to doing that too late. This
moves the call to cpu_hotplug_init() to before mm_init() (it
should be safe to call that early).
This fixes boot with SLAB on some PowerPC machines.
Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
---
Sachin, James, do that fix the boot failures you've been seeing ?
Index: linux-work/init/main.c
===================================================================
--- linux-work.orig/init/main.c 2009-06-23 10:17:46.000000000 +1000
+++ linux-work/init/main.c 2009-06-23 10:20:30.000000000 +1000
@@ -608,7 +608,18 @@ asmlinkage void __init start_kernel(void
vfs_caches_init_early();
sort_main_extable();
trap_init();
+
+ /*
+ * This initializes the mutex used by get/put_online_cpus()
+ * which is used by SLAB
+ */
+ cpu_hotplug_init();
+
+ /*
+ * Initialize the page allocator, SL*B and vmalloc
+ */
mm_init();
+
/*
* Set up the scheduler prior starting any interrupts (such as the
* timer interrupt). Full topology setup happens at smp_init()
@@ -678,7 +689,6 @@ asmlinkage void __init start_kernel(void
#endif
page_cgroup_init();
enable_debug_pagealloc();
- cpu_hotplug_init();
kmemtrace_init();
kmemleak_init();
debug_objects_mem_init();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists