From: Xiaotian Feng <dfeng@redhat.com>
To: Marc Dionne <marc.c.dionne@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Subject: Re: BUG during shutdown - bisected to commit e2912009
Date: Thu, 07 Jan 2010 10:51:52 +0800 [thread overview]
Message-ID: <4B454C48.2000404@redhat.com> (raw)
In-Reply-To: <6041d2001001061644i59d9cbb6pfcd85177d8391419@mail.gmail.com>
On 01/07/2010 08:44 AM, Marc Dionne wrote:
> On Wed, Jan 6, 2010 at 4:42 AM, Xiaotian Feng<dfeng@redhat.com> wrote:
>> On 01/06/2010 06:58 AM, Marc Dionne wrote:
>>>
>>> On Tue, Jan 5, 2010 at 5:18 AM, Xiaotian Feng<dfeng@redhat.com> wrote:
>>>>
>>>> This is outputed by sound module, but it will not affect clockevents,
>>>> could
>>>> you please try following patch and let me know the output before BUG_ON
>>>> happens? We can gather more information on the BUG_ON. Thank you.
>>>>
>>>> diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
>>>> index 6f740d9..7c945e8 100644
>>>> --- a/kernel/time/clockevents.c
>>>> +++ b/kernel/time/clockevents.c
>>>> @@ -260,6 +260,9 @@ void clockevents_notify(unsigned long reason, void
>>>> *arg)
>>>> list_for_each_entry_safe(dev, tmp,&clockevent_devices,
>>>> list)
>>>> {
>>>> if (cpumask_test_cpu(cpu, dev->cpumask)&&
>>>> cpumask_weight(dev->cpumask) == 1) {
>>>> + if (dev->mode != CLOCK_EVT_MODE_UNUSED)
>>>> + printk("invalid dev %s mode %d on
>>>> cpu %d\n", dev->name,
>>>> + dev->mode, cpu);
>>>> BUG_ON(dev->mode !=
>>>> CLOCK_EVT_MODE_UNUSED);
>>>> list_del(&dev->list);
>>>
>>> I don't get anything on screen from the printk - is there a trick
>>> needed to getting printk output at that stage of shutting down? I
>>> tried inserting an mdelay() before the BUG, which delayed the bug
>>> output but still didn't print the invalid dev message.
>>
>> Did you notice this BUG when you're doing suspend/resume?
>>
>> Does the BUG still appear if we changed BUG_ON line to BUG_ON(dev->mode !=
>> CLOCK_EVT_MODE_UNUSED&& dev->mode != CLOCK_EVT_MODE_SHUTDOWN)?
>
> I only see the BUG on halt - reboot works normally and suspend
> actually freezes and doesn't suspend, but that's perhaps unrelated.
>
> I managed to get your suggested printk to work by adding KERN_CRIT
> (otherwise I got no output), and the offending dev is:
> "hpet", mode 3 (CLOCK_EVT_MODE_ONESHOT?), cpu 4.
It looks like kernel is trying to remove broadcast device, could you
please try following patch?
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 6f740d9..d7395fd 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -259,7 +259,8 @@ 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) {
+ cpumask_weight(dev->cpumask) == 1 &&
+ !tick_is_broadcast_device(dev)) {
BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
list_del(&dev->list);
}
>
> Marc
>
next prev parent reply other threads:[~2010-01-07 2:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 0:27 BUG during shutdown - bisected to commit e2912009 Marc Dionne
2010-01-02 0:42 ` Peter Zijlstra
2010-01-04 18:43 ` Marc Dionne
2010-01-05 2:56 ` Xiaotian Feng
2010-01-05 3:23 ` Marc Dionne
2010-01-05 10:18 ` Xiaotian Feng
2010-01-05 22:58 ` Marc Dionne
2010-01-06 9:42 ` Xiaotian Feng
2010-01-07 0:44 ` Marc Dionne
2010-01-07 2:51 ` Xiaotian Feng [this message]
2010-01-07 3:07 ` Marc Dionne
2010-01-07 3:20 ` Marc Dionne
2010-01-07 3:24 ` Xiaotian Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B454C48.2000404@redhat.com \
--to=dfeng@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.c.dionne@gmail.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.