public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clockevent: don't remove broadcast device when cpu is dead
@ 2010-01-07  3:22 Xiaotian Feng
  2010-01-12  2:24 ` Xiaotian Feng
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Xiaotian Feng @ 2010-01-07  3:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Xiaotian Feng, Thomas Gleixner, Magnus Damm, H Hartley Sweeten

Marc reported BUG during shutdown, after debugging, kernel is trying
to remove a broadcast device which mode is CLOCK_EVT_MODE_ONESHOT.

The root cause for this bug is that in clockevents_notify,
"cpumask_weight(dev->cpumask) == 1" is always true even if dev is a
broadcast device. We need to use tick_is_broadcast_device to check
if it is a broadcast device.

Reported-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
---
 kernel/time/clockevents.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 6f740d9..0223d83 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -259,7 +259,7 @@ void clockevents_notify(unsigned long reason, void *arg)
 		cpu = *((int *)arg);
 		list_for_each_entry_safe(dev, tmp, &clockevent_devices, list) {
 			if (cpumask_test_cpu(cpu, dev->cpumask) &&
-			    cpumask_weight(dev->cpumask) == 1) {
+			    !tick_is_broadcast_device(dev)) {
 				BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
 				list_del(&dev->list);
 			}
-- 
1.6.5.2


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

end of thread, other threads:[~2010-01-18 13:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07  3:22 [PATCH] clockevent: don't remove broadcast device when cpu is dead Xiaotian Feng
2010-01-12  2:24 ` Xiaotian Feng
2010-01-12 13:20 ` Thomas Gleixner
2010-01-13  1:28   ` Marc Dionne
2010-01-13  1:48   ` Xiaotian Feng
2010-01-13 22:08     ` Thomas Gleixner
2010-01-14 11:43       ` Xiaotian Feng
2010-01-14 11:52         ` Thomas Gleixner
2010-01-18 13:48 ` [tip:timers/urgent] clockevent: Don't " tip-bot for Xiaotian Feng

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