public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/init: cpu_hotplug_init() must be initialized before SLAB
@ 2009-06-23  0:31 Benjamin Herrenschmidt
  2009-06-23  1:13 ` James Bottomley
  2009-06-23  2:29 ` Linus Torvalds
  0 siblings, 2 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2009-06-23  0:31 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: James Bottomley, Pekka Enberg, linux-kernel, Rafael J. Wysocki,
	Sachin Sant

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@kernel.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();



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-06-23  5:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23  0:31 [PATCH] mm/init: cpu_hotplug_init() must be initialized before SLAB Benjamin Herrenschmidt
2009-06-23  1:13 ` James Bottomley
2009-06-23  2:29 ` Linus Torvalds
2009-06-23  2:59   ` Benjamin Herrenschmidt
2009-06-23  3:23   ` Benjamin Herrenschmidt
2009-06-23  3:26   ` Sachin Sant
2009-06-23  4:00   ` James Bottomley
2009-06-23  5:59   ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox