public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Ignore bogus ACPI info for offline CPUs
@ 2007-05-19 14:22 Thomas Gleixner
  2007-05-21 16:47 ` Darren Hart
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2007-05-19 14:22 UTC (permalink / raw)
  To: LKML; +Cc: Len Brown, Darren Hart, Ingo Molnar, Andrew Morton, Stable Team

Booting a SMP kernel with maxcpus=1 on a SMP system leads to a hard
hang, because ACPI ignores the maxcpus setting and sends timer broadcast
info for the offline CPUs. This results in a stuck for ever call to
smp_call_function_single() on an offline CPU.

Ignore the bogus information and print a kernel error to remind ACPI
folks to fix it.

Affects 2.6.21 / 2.6.22-rc

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Index: linux-2.6.22-rc/kernel/time/tick-broadcast.c
===================================================================
--- linux-2.6.22-rc.orig/kernel/time/tick-broadcast.c
+++ linux-2.6.22-rc/kernel/time/tick-broadcast.c
@@ -244,11 +244,18 @@ void tick_broadcast_on_off(unsigned long
 {
 	int cpu = get_cpu();
 
-	if (cpu == *oncpu)
-		tick_do_broadcast_on_off(&reason);
-	else
-		smp_call_function_single(*oncpu, tick_do_broadcast_on_off,
-					 &reason, 1, 1);
+	if (!cpu_isset(*oncpu, cpu_online_map)) {
+		printk(KERN_ERR "tick-braodcast: ignoring broadcast for "
+		       "offline CPU #%d\n", *oncpu);
+	} else {
+
+		if (cpu == *oncpu)
+			tick_do_broadcast_on_off(&reason);
+		else
+			smp_call_function_single(*oncpu,
+						 tick_do_broadcast_on_off,
+						 &reason, 1, 1);
+	}
 	put_cpu();
 }
 



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

end of thread, other threads:[~2007-05-21 18:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-19 14:22 [PATCH] Ignore bogus ACPI info for offline CPUs Thomas Gleixner
2007-05-21 16:47 ` Darren Hart
2007-05-21 17:08   ` [stable] " Chris Wright
2007-05-21 17:32     ` Thomas Gleixner
2007-05-21 17:57       ` Chris Wright
2007-05-21 17:58     ` Darren Hart

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