All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2 2.6.31-rc5 REPOST] init: set nr_cpu_ids before setup_per_cpu_areas()
@ 2009-08-06  9:33 ` Tejun Heo
  0 siblings, 0 replies; 16+ messages in thread
From: Tejun Heo @ 2009-08-06  9:33 UTC (permalink / raw)
  To: Linux Kernel, Ingo Molnar, David Miller, sparclinux

nr_cpu_ids is dependent only on cpu_possible_map and
setup_per_cpu_areas() already depends on cpu_possible_map and will use
nr_cpu_ids.  Initialize nr_cpu_ids before setting up percpu areas.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
This is repost of the following two patches with sparclinux mailing
list cc'd because I couldn't get any response from David Miller.
Nothing has changed code-wise.

 http://thread.gmane.org/gmane.linux.kernel/867587

These two patches fix boot failure on sparc64 which happens if the
cpus don't have consecutive cpu numbers.

Thanks.

 init/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init/main.c b/init/main.c
index 2c5ade7..2d9d6bd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -584,8 +584,8 @@ asmlinkage void __init start_kernel(void)
 	setup_arch(&command_line);
 	mm_init_owner(&init_mm, &init_task);
 	setup_command_line(command_line);
-	setup_per_cpu_areas();
 	setup_nr_cpu_ids();
+	setup_per_cpu_areas();
 	smp_prepare_boot_cpu();	/* arch-specific boot-cpu hooks */

 	build_all_zonelists();
-- 
1.6.0.2


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

end of thread, other threads:[~2009-08-14  4:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06  9:33 [PATCH 1/2 2.6.31-rc5 REPOST] init: set nr_cpu_ids before setup_per_cpu_areas() Tejun Heo
2009-08-06  9:33 ` Tejun Heo
2009-08-06  9:36 ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible Tejun Heo
2009-08-06  9:36   ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible cpu map handling Tejun Heo
2009-08-06 11:57   ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse Ingo Molnar
2009-08-06 11:57     ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible cpu map handling Ingo Molnar
2009-08-06 16:15     ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible Tejun Heo
2009-08-06 16:15       ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible cpu map handling Tejun Heo
2009-08-12  6:10       ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible Tejun Heo
2009-08-12  6:10         ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible cpu map handling Tejun Heo
2009-08-12 23:25         ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse David Miller
2009-08-12 23:25           ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible cpu map handling David Miller
2009-08-14  4:26           ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible Tejun Heo
2009-08-14  4:26             ` [PATCH 2/2 2.6.31-rc5 REPOST] percpu, sparc64: fix sparse possible cpu map handling Tejun Heo
2009-08-14  4:27             ` [PATCH 2/2 2.6.31-rc5 UPDATED] percpu, sparc64: fix sparse possible Tejun Heo
2009-08-14  4:27               ` [PATCH 2/2 2.6.31-rc5 UPDATED] percpu, sparc64: fix sparse possible cpu map handling Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.