2009-04-19 16:53:36

by Alexey Klimov

[permalink] [raw]
Subject: [warn_once] warning: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()

Hello all
When testing behaviour of radio-mr800 drvier when doing suspend/resume
to disk, using echo disk > /sys/power/state i have such warning in
dmesg(see below please).
Kernel is 30-rc2, up-to-date. If you need more information, feel free to ask.
The code in hrtimer.c is:

void hres_timers_resume(void)
{
WARN_ONCE(!irqs_disabled(),
KERN_INFO "hres_timers_resume() called with IRQs enabled!");



------------[ cut here ]------------
WARNING: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()
Hardware name: TravelMate 2350
hres_timers_resume() called with IRQs enabled!Modules linked in:
radio_mr800 v4l2_common videodev snd_intel8x0 nls_utf8 cifs
snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep nls_iso8859_1
nls_cp437 vfat fat nls_base v4l1_compat i915 drm cpufreq_ondemand
acpi_cpufreq snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
snd_seq_device snd_pcm_oss snd_mixer_oss usbhid hid snd_ac97_codec
ac97_bus yenta_socket snd_pcm rsrc_nonstatic 8139cp pcmcia_core
rtc_cmos snd_timer 8139too libipw ehci_hcd snd lib80211 psmouse
rtc_core uhci_hcd mii soundcore usbcore shpchp sr_mod serio_raw cdrom
ac thermal i2c_i801 battery button rtc_lib pci_hotplug sg
snd_page_alloc [last unloaded: radio_mr800]
Pid: 25506, comm: bash Not tainted 2.6.30-rc2 #43
Call Trace:
[<c011852d>] ? warn_slowpath+0x80/0xae
[<c01fd36a>] ? acpi_ns_lookup+0x1fa/0x316
[<c011452e>] ? wakeup_preempt_entity+0xc3/0xe9
[<c012aa73>] ? getnstimeofday+0x4c/0xc9
[<c010d02f>] ? lapic_next_event+0x13/0x16
[<c012cb79>] ? clockevents_program_event+0xc2/0xd0
[<c012d687>] ? tick_dev_program_event+0x1e/0x81
[<c012d729>] ? tick_program_event+0xf/0x11
[<c01288be>] ? notifier_call_chain+0x2a/0x47
[<c0127ec6>] ? hres_timers_resume+0x24/0x38
[<c012a1b5>] ? timekeeping_resume+0xcb/0xd0
[<c02307f4>] ? __sysdev_resume+0x11/0x34
[<c0230835>] ? sysdev_resume+0x1e/0x50
[<c01344e0>] ? hibernation_snapshot+0xd5/0x15b
[<c01345f2>] ? hibernate+0x8c/0x141
[<c0133566>] ? state_store+0x0/0x9a
[<c01335b4>] ? state_store+0x4e/0x9a
[<c0133566>] ? state_store+0x0/0x9a
[<c01ca6f7>] ? kobj_attr_store+0x18/0x1c
[<c018b929>] ? sysfs_write_file+0xb0/0xdd
[<c018b879>] ? sysfs_write_file+0x0/0xdd
[<c015a537>] ? vfs_write+0x84/0xf7
[<c015a642>] ? sys_write+0x3c/0x63
[<c0102788>] ? sysenter_do_call+0x12/0x26
---[ end trace df0f2ac34650ffc9 ]---


2009-04-27 21:36:26

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [warn_once] warning: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()

On Sunday 19 April 2009, Alexey Klimov wrote:
> Hello all
> When testing behaviour of radio-mr800 drvier when doing suspend/resume
> to disk, using echo disk > /sys/power/state i have such warning in
> dmesg(see below please).
> Kernel is 30-rc2, up-to-date. If you need more information, feel free to ask.

Can you please retest with the appended patch applied and report back?

> The code in hrtimer.c is:
>
> void hres_timers_resume(void)
> {
> WARN_ONCE(!irqs_disabled(),
> KERN_INFO "hres_timers_resume() called with IRQs enabled!");
>
>
>
> ------------[ cut here ]------------
> WARNING: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()
> Hardware name: TravelMate 2350
> hres_timers_resume() called with IRQs enabled!Modules linked in:
> radio_mr800 v4l2_common videodev snd_intel8x0 nls_utf8 cifs
> snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep nls_iso8859_1
> nls_cp437 vfat fat nls_base v4l1_compat i915 drm cpufreq_ondemand
> acpi_cpufreq snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
> snd_seq_device snd_pcm_oss snd_mixer_oss usbhid hid snd_ac97_codec
> ac97_bus yenta_socket snd_pcm rsrc_nonstatic 8139cp pcmcia_core
> rtc_cmos snd_timer 8139too libipw ehci_hcd snd lib80211 psmouse
> rtc_core uhci_hcd mii soundcore usbcore shpchp sr_mod serio_raw cdrom
> ac thermal i2c_i801 battery button rtc_lib pci_hotplug sg
> snd_page_alloc [last unloaded: radio_mr800]
> Pid: 25506, comm: bash Not tainted 2.6.30-rc2 #43
> Call Trace:
> [<c011852d>] ? warn_slowpath+0x80/0xae
> [<c01fd36a>] ? acpi_ns_lookup+0x1fa/0x316
> [<c011452e>] ? wakeup_preempt_entity+0xc3/0xe9
> [<c012aa73>] ? getnstimeofday+0x4c/0xc9
> [<c010d02f>] ? lapic_next_event+0x13/0x16
> [<c012cb79>] ? clockevents_program_event+0xc2/0xd0
> [<c012d687>] ? tick_dev_program_event+0x1e/0x81
> [<c012d729>] ? tick_program_event+0xf/0x11
> [<c01288be>] ? notifier_call_chain+0x2a/0x47
> [<c0127ec6>] ? hres_timers_resume+0x24/0x38
> [<c012a1b5>] ? timekeeping_resume+0xcb/0xd0
> [<c02307f4>] ? __sysdev_resume+0x11/0x34
> [<c0230835>] ? sysdev_resume+0x1e/0x50
> [<c01344e0>] ? hibernation_snapshot+0xd5/0x15b
> [<c01345f2>] ? hibernate+0x8c/0x141
> [<c0133566>] ? state_store+0x0/0x9a
> [<c01335b4>] ? state_store+0x4e/0x9a
> [<c0133566>] ? state_store+0x0/0x9a
> [<c01ca6f7>] ? kobj_attr_store+0x18/0x1c
> [<c018b929>] ? sysfs_write_file+0xb0/0xdd
> [<c018b879>] ? sysfs_write_file+0x0/0xdd
> [<c015a537>] ? vfs_write+0x84/0xf7
> [<c015a642>] ? sys_write+0x3c/0x63
> [<c0102788>] ? sysenter_do_call+0x12/0x26
> ---[ end trace df0f2ac34650ffc9 ]---
> --

Best,
Rafael

---

PM: Warn if interrupts are enabled during suspend-resume of sysdevs

Sysdevs have to be suspended and resumed with interrupts disabled and
things usually break in a way that's difficult to debug if one of
sysdev drivers enables interrupts by mistake during suspend or
resume. Add extra checks that will generate warnings in such cases.

Signed-off-by: Rafael J. Wysocki <[email protected]>

diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 3236b43..9742a78 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -343,11 +343,15 @@ static void __sysdev_resume(struct sys_device *dev)
/* First, call the class-specific one */
if (cls->resume)
cls->resume(dev);
+ WARN_ONCE(!irqs_disabled(),
+ "Interrupts enabled after %pF\n", cls->resume);

/* Call auxillary drivers next. */
list_for_each_entry(drv, &cls->drivers, entry) {
if (drv->resume)
drv->resume(dev);
+ WARN_ONCE(!irqs_disabled(),
+ "Interrupts enabled after %pF\n", drv->resume);
}
}

@@ -377,6 +381,9 @@ int sysdev_suspend(pm_message_t state)
if (ret)
return ret;

+ WARN_ONCE(!irqs_disabled(),
+ "Interrupts enabled while suspending system devices\n");
+
pr_debug("Suspending System Devices\n");

list_for_each_entry_reverse(cls, &system_kset->list, kset.kobj.entry) {
@@ -393,6 +400,9 @@ int sysdev_suspend(pm_message_t state)
if (ret)
goto aux_driver;
}
+ WARN_ONCE(!irqs_disabled(),
+ "Interrupts enabled after %pF\n",
+ drv->suspend);
}

/* Now call the generic one */
@@ -400,6 +410,9 @@ int sysdev_suspend(pm_message_t state)
ret = cls->suspend(sysdev, state);
if (ret)
goto cls_driver;
+ WARN_ONCE(!irqs_disabled(),
+ "Interrupts enabled after %pF\n",
+ cls->suspend);
}
}
}
@@ -452,6 +465,9 @@ int sysdev_resume(void)
{
struct sysdev_class *cls;

+ WARN_ONCE(!irqs_disabled(),
+ "Interrupts enabled while resuming system devices\n");
+
pr_debug("Resuming System Devices\n");

list_for_each_entry(cls, &system_kset->list, kset.kobj.entry) {

2009-04-29 13:21:49

by Alexey Klimov

[permalink] [raw]
Subject: Re: [warn_once] warning: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()

Hello,

On Tue, Apr 28, 2009 at 1:35 AM, Rafael J. Wysocki <[email protected]> wrote:
> On Sunday 19 April 2009, Alexey Klimov wrote:
>> Hello all
>> When testing behaviour of radio-mr800 drvier when doing suspend/resume
>> to disk, using echo disk > /sys/power/state i have such warning in
>> dmesg(see below please).
>> Kernel is 30-rc2, up-to-date. If you need more information, feel free to ask.
>
> Can you please retest with the appended patch applied and report back?

Of course. I applied your patch against up-to-date sources (30-rc3),
and have more messages after resume:

ACPI: Preparing to enter system sleep state S4
PM: Saving platform NVS memory
------------[ cut here ]------------
WARNING: at drivers/base/sys.c:405 sysdev_suspend+0xb6/0x21c()
Hardware name: TravelMate 2350
Interrupts enabled after cpufreq_suspend+0x0/0x113
Modules linked in: cpufreq_ondemand acpi_cpufreq snd_seq_dummy
snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss
snd_mixer_oss usbhid hid snd_intel8x0 snd_ac97_codec ipw2200 libipw
ac97_bus yenta_socket snd_pcm rsrc_nonstatic 8139cp pcmcia_core
8139too lib80211 snd_timer mii ehci_hcd shpchp rtc_cmos rtc_core
sr_mod sg psmouse cdrom snd uhci_hcd pci_hotplug rtc_lib usbcore
thermal serio_raw soundcore ac snd_page_alloc i2c_i801 battery button
Pid: 1557, comm: bash Not tainted 2.6.30-rc3 #48
Call Trace:
[<c011852d>] ? warn_slowpath+0x80/0xae
[<c0102e0a>] ? apic_timer_interrupt+0x2a/0x30
[<c01cc9d7>] ? rb_insert_color+0x93/0xb5
[<c0150c88>] ? __insert_vmap_area+0x5e/0x96
[<c0150e46>] ? alloc_vmap_area+0x186/0x192
[<c01e90d9>] ? acpi_os_release_object+0x5/0x8
[<c01061f5>] ? init_pit_timer+0x56/0xa1
[<c012cbd1>] ? clockevents_set_mode+0x12/0x3b
[<f8e071f5>] ? get_cur_val+0x78/0x87 [acpi_cpufreq]
[<f8e0748e>] ? get_cur_freq_on_cpu+0x6e/0x84 [acpi_cpufreq]
[<c025e1c8>] ? cpufreq_cpu_put+0x8/0x14
[<c025eea6>] ? cpufreq_suspend+0x109/0x113
[<c010d22f>] ? clear_local_APIC+0x18f/0x191
[<c0230cb2>] ? sysdev_suspend+0xb6/0x21c
[<c025ed9d>] ? cpufreq_suspend+0x0/0x113
[<c01344ed>] ? hibernation_snapshot+0x8b/0x15b
[<c0134649>] ? hibernate+0x8c/0x141
[<c01335c2>] ? state_store+0x0/0x9a
[<c0133610>] ? state_store+0x4e/0x9a
[<c01335c2>] ? state_store+0x0/0x9a
[<c01ca757>] ? kobj_attr_store+0x18/0x1c
[<c018b8ed>] ? sysfs_write_file+0xb0/0xdd
[<c018b83d>] ? sysfs_write_file+0x0/0xdd
[<c015a5bb>] ? vfs_write+0x84/0xf7
[<c015a6c6>] ? sys_write+0x3c/0x63
[<c0102788>] ? sysenter_do_call+0x12/0x26
---[ end trace 723ae552bfab9043 ]---
PM: Creating hibernation image:
PM: Need to copy 14279 pages
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
PM: Restoring platform NVS memory
------------[ cut here ]------------
WARNING: at drivers/base/sys.c:469 sysdev_resume+0x27/0x81()
Hardware name: TravelMate 2350
Interrupts enabled while resuming system devices
Modules linked in: cpufreq_ondemand acpi_cpufreq snd_seq_dummy
snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss
snd_mixer_oss usbhid hid snd_intel8x0 snd_ac97_codec ipw2200 libipw
ac97_bus yenta_socket snd_pcm rsrc_nonstatic 8139cp pcmcia_core
8139too lib80211 snd_timer mii ehci_hcd shpchp rtc_cmos rtc_core
sr_mod sg psmouse cdrom snd uhci_hcd pci_hotplug rtc_lib usbcore
thermal serio_raw soundcore ac snd_page_alloc i2c_i801 battery button
Pid: 1557, comm: bash Tainted: G W 2.6.30-rc3 #48
Call Trace:
[<c011852d>] ? warn_slowpath+0x80/0xae
[<c01fffe2>] ? acpi_ns_check_predefined_names+0x46e/0x478
[<c01ce800>] ? vsprintf+0xd/0xf
[<c0118861>] ? try_acquire_console_sem+0x24/0x42
[<c01fd3fe>] ? acpi_hw_read_port+0x23/0x71
[<c01fd382>] ? acpi_hw_write_port+0x11/0x6a
[<c01fc7c4>] ? acpi_hw_write_pm1_control+0xd/0x31
[<c01fccbc>] ? acpi_leave_sleep_state_prep+0x8a/0xf7
[<c01fc92e>] ? acpi_hw_register_read+0x4e/0xb2
[<c0230ba2>] ? sysdev_resume+0x27/0x81
[<c0134537>] ? hibernation_snapshot+0xd5/0x15b
[<c0134649>] ? hibernate+0x8c/0x141
[<c01335c2>] ? state_store+0x0/0x9a
[<c0133610>] ? state_store+0x4e/0x9a
[<c01335c2>] ? state_store+0x0/0x9a
[<c01ca757>] ? kobj_attr_store+0x18/0x1c
[<c018b8ed>] ? sysfs_write_file+0xb0/0xdd
[<c018b83d>] ? sysfs_write_file+0x0/0xdd
[<c015a5bb>] ? vfs_write+0x84/0xf7
[<c015a6c6>] ? sys_write+0x3c/0x63
[<c0102788>] ? sysenter_do_call+0x12/0x26
---[ end trace 723ae552bfab9044 ]---
------------[ cut here ]------------
WARNING: at drivers/base/sys.c:347 __sysdev_resume+0x38/0x9c()
Hardware name: TravelMate 2350
Interrupts enabled after (null)
Modules linked in: cpufreq_ondemand acpi_cpufreq snd_seq_dummy
snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss
snd_mixer_oss usbhid hid snd_intel8x0 snd_ac97_codec ipw2200 libipw
ac97_bus yenta_socket snd_pcm rsrc_nonstatic 8139cp pcmcia_core
8139too lib80211 snd_timer mii ehci_hcd shpchp rtc_cmos rtc_core
sr_mod sg psmouse cdrom snd uhci_hcd pci_hotplug rtc_lib usbcore
thermal serio_raw soundcore ac snd_page_alloc i2c_i801 battery button
Pid: 1557, comm: bash Tainted: G W 2.6.30-rc3 #48
Call Trace:
[<c011852d>] ? warn_slowpath+0x80/0xae
[<c01fffe2>] ? acpi_ns_check_predefined_names+0x46e/0x478
[<c01ce800>] ? vsprintf+0xd/0xf
[<c0118861>] ? try_acquire_console_sem+0x24/0x42
[<c01fd3fe>] ? acpi_hw_read_port+0x23/0x71
[<c01fd382>] ? acpi_hw_write_port+0x11/0x6a
[<c01fc7c4>] ? acpi_hw_write_pm1_control+0xd/0x31
[<c0230b17>] ? __sysdev_resume+0x38/0x9c
[<c0230bca>] ? sysdev_resume+0x4f/0x81
[<c0134537>] ? hibernation_snapshot+0xd5/0x15b
[<c0134649>] ? hibernate+0x8c/0x141
[<c01335c2>] ? state_store+0x0/0x9a
[<c0133610>] ? state_store+0x4e/0x9a
[<c01335c2>] ? state_store+0x0/0x9a
[<c01ca757>] ? kobj_attr_store+0x18/0x1c
[<c018b8ed>] ? sysfs_write_file+0xb0/0xdd
[<c018b83d>] ? sysfs_write_file+0x0/0xdd
[<c015a5bb>] ? vfs_write+0x84/0xf7
[<c015a6c6>] ? sys_write+0x3c/0x63
[<c0102788>] ? sysenter_do_call+0x12/0x26
---[ end trace 723ae552bfab9045 ]---
------------[ cut here ]------------
WARNING: at drivers/base/sys.c:354 __sysdev_resume+0x7f/0x9c()
Hardware name: TravelMate 2350
Interrupts enabled after cpufreq_resume+0x0/0x115
Modules linked in: cpufreq_ondemand acpi_cpufreq snd_seq_dummy
snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss
snd_mixer_oss usbhid hid snd_intel8x0 snd_ac97_codec ipw2200 libipw
ac97_bus yenta_socket snd_pcm rsrc_nonstatic 8139cp pcmcia_core
8139too lib80211 snd_timer mii ehci_hcd shpchp rtc_cmos rtc_core
sr_mod sg psmouse cdrom snd uhci_hcd pci_hotplug rtc_lib usbcore
thermal serio_raw soundcore ac snd_page_alloc i2c_i801 battery button
Pid: 1557, comm: bash Tainted: G W 2.6.30-rc3 #48
Call Trace:
[<c011852d>] ? warn_slowpath+0x80/0xae
[<c011452e>] ? wakeup_preempt_entity+0xc3/0xe9
[<c01145d9>] ? check_preempt_wakeup+0x85/0xab
[<c0125c00>] ? wake_up_bit+0xc/0x5c
[<c0114e4d>] ? __wake_up_common+0x2d/0x52
[<c0114e81>] ? __wake_up+0xf/0x15
[<c0123370>] ? __queue_work+0x43/0x49
[<c025e1c8>] ? cpufreq_cpu_put+0x8/0x14
[<c025ed94>] ? cpufreq_resume+0x10c/0x115
[<c0230b5e>] ? __sysdev_resume+0x7f/0x9c
[<c025ec88>] ? cpufreq_resume+0x0/0x115
[<c0230bca>] ? sysdev_resume+0x4f/0x81
[<c0134537>] ? hibernation_snapshot+0xd5/0x15b
[<c0134649>] ? hibernate+0x8c/0x141
[<c01335c2>] ? state_store+0x0/0x9a
[<c0133610>] ? state_store+0x4e/0x9a
[<c01335c2>] ? state_store+0x0/0x9a
[<c01ca757>] ? kobj_attr_store+0x18/0x1c
[<c018b8ed>] ? sysfs_write_file+0xb0/0xdd
[<c018b83d>] ? sysfs_write_file+0x0/0xdd
[<c015a5bb>] ? vfs_write+0x84/0xf7
[<c015a6c6>] ? sys_write+0x3c/0x63
[<c0102788>] ? sysenter_do_call+0x12/0x26
---[ end trace 723ae552bfab9046 ]---
------------[ cut here ]------------
WARNING: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()
Hardware name: TravelMate 2350
hres_timers_resume() called with IRQs enabled!Modules linked in:
cpufreq_ondemand acpi_cpufreq snd_seq_dummy snd_seq_oss
snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss
usbhid hid snd_intel8x0 snd_ac97_codec ipw2200 libipw ac97_bus
yenta_socket snd_pcm rsrc_nonstatic 8139cp pcmcia_core 8139too
lib80211 snd_timer mii ehci_hcd shpchp rtc_cmos rtc_core sr_mod sg
psmouse cdrom snd uhci_hcd pci_hotplug rtc_lib usbcore thermal
serio_raw soundcore ac snd_page_alloc i2c_i801 battery button
Pid: 1557, comm: bash Tainted: G W 2.6.30-rc3 #48
Call Trace:
[<c011852d>] ? warn_slowpath+0x80/0xae
[<c011452e>] ? wakeup_preempt_entity+0xc3/0xe9
[<c0103f7b>] ? handle_irq+0xb/0x64
[<c011b9f2>] ? irq_exit+0x2c/0x4e
[<c0103ccb>] ? do_IRQ+0x53/0x63
[<c012aaa5>] ? getnstimeofday+0x4f/0xcc
[<c010d023>] ? lapic_next_event+0x13/0x16
[<c012cbb1>] ? clockevents_program_event+0xc2/0xd0
[<c012d6bf>] ? tick_dev_program_event+0x1e/0x81
[<c012d761>] ? tick_program_event+0xf/0x11
[<c01288ba>] ? notifier_call_chain+0x2a/0x47
[<c0127ec2>] ? hres_timers_resume+0x24/0x38
[<c012a1b9>] ? timekeeping_resume+0xcd/0xd2
[<c0230af0>] ? __sysdev_resume+0x11/0x9c
[<c0230bca>] ? sysdev_resume+0x4f/0x81
[<c0134537>] ? hibernation_snapshot+0xd5/0x15b
[<c0134649>] ? hibernate+0x8c/0x141
[<c01335c2>] ? state_store+0x0/0x9a
[<c0133610>] ? state_store+0x4e/0x9a
[<c01335c2>] ? state_store+0x0/0x9a
[<c01ca757>] ? kobj_attr_store+0x18/0x1c
[<c018b8ed>] ? sysfs_write_file+0xb0/0xdd
[<c018b83d>] ? sysfs_write_file+0x0/0xdd
[<c015a5bb>] ? vfs_write+0x84/0xf7
[<c015a6c6>] ? sys_write+0x3c/0x63
[<c0102788>] ? sysenter_do_call+0x12/0x26
---[ end trace 723ae552bfab9047 ]---
ACPI: Waking up from system sleep state S4

I can do more testing if you need, just ask.

> ---
>
> ? ?PM: Warn if interrupts are enabled during suspend-resume of sysdevs
>
> ? ?Sysdevs have to be suspended and resumed with interrupts disabled and
> ? ?things usually break in a way that's difficult to debug if one of
> ? ?sysdev drivers enables interrupts by mistake during suspend or
> ? ?resume. ?Add extra checks that will generate warnings in such cases.
>
> ? ?Signed-off-by: Rafael J. Wysocki <[email protected]>
>
> diff --git a/drivers/base/sys.c b/drivers/base/sys.c
> index 3236b43..9742a78 100644
> --- a/drivers/base/sys.c
> +++ b/drivers/base/sys.c
> @@ -343,11 +343,15 @@ static void __sysdev_resume(struct sys_device *dev)
> ? ? ? ?/* First, call the class-specific one */
> ? ? ? ?if (cls->resume)
> ? ? ? ? ? ? ? ?cls->resume(dev);
> + ? ? ? WARN_ONCE(!irqs_disabled(),
> + ? ? ? ? ? ? ? "Interrupts enabled after %pF\n", cls->resume);
>
> ? ? ? ?/* Call auxillary drivers next. */
> ? ? ? ?list_for_each_entry(drv, &cls->drivers, entry) {
> ? ? ? ? ? ? ? ?if (drv->resume)
> ? ? ? ? ? ? ? ? ? ? ? ?drv->resume(dev);
> + ? ? ? ? ? ? ? WARN_ONCE(!irqs_disabled(),
> + ? ? ? ? ? ? ? ? ? ? ? "Interrupts enabled after %pF\n", drv->resume);
> ? ? ? ?}
> ?}
>
> @@ -377,6 +381,9 @@ int sysdev_suspend(pm_message_t state)
> ? ? ? ?if (ret)
> ? ? ? ? ? ? ? ?return ret;
>
> + ? ? ? WARN_ONCE(!irqs_disabled(),
> + ? ? ? ? ? ? ? "Interrupts enabled while suspending system devices\n");
> +
> ? ? ? ?pr_debug("Suspending System Devices\n");
>
> ? ? ? ?list_for_each_entry_reverse(cls, &system_kset->list, kset.kobj.entry) {
> @@ -393,6 +400,9 @@ int sysdev_suspend(pm_message_t state)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (ret)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?goto aux_driver;
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?}
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? WARN_ONCE(!irqs_disabled(),
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "Interrupts enabled after %pF\n",
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? drv->suspend);
> ? ? ? ? ? ? ? ? ? ? ? ?}
>
> ? ? ? ? ? ? ? ? ? ? ? ?/* Now call the generic one */
> @@ -400,6 +410,9 @@ int sysdev_suspend(pm_message_t state)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ret = cls->suspend(sysdev, state);
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?if (ret)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?goto cls_driver;
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? WARN_ONCE(!irqs_disabled(),
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "Interrupts enabled after %pF\n",
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cls->suspend);
> ? ? ? ? ? ? ? ? ? ? ? ?}
> ? ? ? ? ? ? ? ?}
> ? ? ? ?}
> @@ -452,6 +465,9 @@ int sysdev_resume(void)
> ?{
> ? ? ? ?struct sysdev_class *cls;
>
> + ? ? ? WARN_ONCE(!irqs_disabled(),
> + ? ? ? ? ? ? ? "Interrupts enabled while resuming system devices\n");
> +
> ? ? ? ?pr_debug("Resuming System Devices\n");
>
> ? ? ? ?list_for_each_entry(cls, &system_kset->list, kset.kobj.entry) {
>

--
Best regards, Klimov Alexey

2009-04-29 19:48:08

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [warn_once] warning: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()

On Wednesday 29 April 2009, Alexey Klimov wrote:
> Hello,
>
> On Tue, Apr 28, 2009 at 1:35 AM, Rafael J. Wysocki <[email protected]> wrote:
> > On Sunday 19 April 2009, Alexey Klimov wrote:
> >> Hello all
> >> When testing behaviour of radio-mr800 drvier when doing suspend/resume
> >> to disk, using echo disk > /sys/power/state i have such warning in
> >> dmesg(see below please).
> >> Kernel is 30-rc2, up-to-date. If you need more information, feel free to ask.
> >
> > Can you please retest with the appended patch applied and report back?
>
> Of course. I applied your patch against up-to-date sources (30-rc3),
> and have more messages after resume:

Thanks!

> ACPI: Preparing to enter system sleep state S4
> PM: Saving platform NVS memory
> ------------[ cut here ]------------
> WARNING: at drivers/base/sys.c:405 sysdev_suspend+0xb6/0x21c()
> Hardware name: TravelMate 2350
> Interrupts enabled after cpufreq_suspend+0x0/0x113

Well, it looks like cpufreq_suspend() left us with interrupts enabled and
that caused the other warnings to be printed. Not nice.

What CPU is there in your box?

Rafael

2009-04-30 08:54:31

by Alexey Klimov

[permalink] [raw]
Subject: Re: [warn_once] warning: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()

Hello, Rafael

On Wed, Apr 29, 2009 at 11:47 PM, Rafael J. Wysocki <[email protected]> wrote:
> On Wednesday 29 April 2009, Alexey Klimov wrote:
>> Hello,
>>
>> On Tue, Apr 28, 2009 at 1:35 AM, Rafael J. Wysocki <[email protected]> wrote:
>> > On Sunday 19 April 2009, Alexey Klimov wrote:
>> >> Hello all
>> >> When testing behaviour of radio-mr800 drvier when doing suspend/resume
>> >> to disk, using echo disk > /sys/power/state i have such warning in
>> >> dmesg(see below please).
>> >> Kernel is 30-rc2, up-to-date. If you need more information, feel free to ask.
>> >
>> > Can you please retest with the appended patch applied and report back?
>>
>> Of course. I applied your patch against up-to-date sources (30-rc3),
>> and have more messages after resume:
>
> Thanks!
>
>> ACPI: Preparing to enter system sleep state S4
>> PM: Saving platform NVS memory
>> ------------[ cut here ]------------
>> WARNING: at drivers/base/sys.c:405 sysdev_suspend+0xb6/0x21c()
>> Hardware name: TravelMate 2350
>> Interrupts enabled after cpufreq_suspend+0x0/0x113
>
> Well, it looks like cpufreq_suspend() left us with interrupts enabled and
> that caused the other warnings to be printed. Not nice.
>
> What CPU is there in your box?
>
> Rafael

Yes, cpufreq_ondemand enabled. It's 1.7 GHz pentium-m. The lowest
frequency is 600 MHz.
Here is my /proc/cpuinfo:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.70GHz
stepping : 6
cpu MHz : 600.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 apic sep mtrr pge mca
cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
bogomips : 1198.79
clflush size : 64
power management:


--
Best regards, Klimov Alexey

2009-06-03 16:43:59

by Alexey Klimov

[permalink] [raw]
Subject: Re: [warn_once] warning: at kernel/hrtimer.c:625 hres_timers_resume+0x24/0x38()

Hello,

On Mon, May 4, 2009 at 4:10 PM, Fabio Comolli <[email protected]> wrote:
> I see the same message with 2.6.29.2 on a laptop with the same CPU
> model also with cpufreq_ondemand.
>
> In my case the first hibernate attempt gives the message and succeeds.
> The system resumes ok.
>
> A further hibernation/resume cycle results in a hang (power cycle required).
>
> It' probably a regression wrt 2.6.28.7 (I'm not sure because with the
> version upgrade I ?also changed my DRI driver from fglrx to radeon and
> also the X.org userspace).
>
> Regards,
> Fabio
>
> On Thu, Apr 30, 2009 at 10:54 AM, Alexey Klimov <[email protected]> wrote:
>> Hello, Rafael
>>
>> On Wed, Apr 29, 2009 at 11:47 PM, Rafael J. Wysocki <[email protected]> wrote:
>>> On Wednesday 29 April 2009, Alexey Klimov wrote:
>>>> Hello,
>>>>
>>>> On Tue, Apr 28, 2009 at 1:35 AM, Rafael J. Wysocki <[email protected]> wrote:
>>>> > On Sunday 19 April 2009, Alexey Klimov wrote:
>>>> >> Hello all
>>>> >> When testing behaviour of radio-mr800 drvier when doing suspend/resume
>>>> >> to disk, using echo disk > /sys/power/state i have such warning in
>>>> >> dmesg(see below please).
>>>> >> Kernel is 30-rc2, up-to-date. If you need more information, feel free to ask.
>>>> >
>>>> > Can you please retest with the appended patch applied and report back?
>>>>
>>>> Of course. I applied your patch against up-to-date sources (30-rc3),
>>>> and have more messages after resume:
>>>
>>> Thanks!
>>>
>>>> ACPI: Preparing to enter system sleep state S4
>>>> PM: Saving platform NVS memory
>>>> ------------[ cut here ]------------
>>>> WARNING: at drivers/base/sys.c:405 sysdev_suspend+0xb6/0x21c()
>>>> Hardware name: TravelMate 2350
>>>> Interrupts enabled after cpufreq_suspend+0x0/0x113
>>>
>>> Well, it looks like cpufreq_suspend() left us with interrupts enabled and
>>> that caused the other warnings to be printed. ?Not nice.
>>>
>>> What CPU is there in your box?
>>>
>>> Rafael
>>
>> Yes, cpufreq_ondemand enabled. It's 1.7 GHz pentium-m. The lowest
>> frequency is 600 MHz.
>> Here is my /proc/cpuinfo:
>>
>> processor ? ? ? : 0
>> vendor_id ? ? ? : GenuineIntel
>> cpu family ? ? ?: 6
>> model ? ? ? ? ? : 13
>> model name ? ? ?: Intel(R) Pentium(R) M processor 1.70GHz
>> stepping ? ? ? ?: 6
>> cpu MHz ? ? ? ? : 600.000
>> cache size ? ? ?: 2048 KB
>> fdiv_bug ? ? ? ?: no
>> hlt_bug ? ? ? ? : no
>> f00f_bug ? ? ? ?: no
>> coma_bug ? ? ? ?: no
>> fpu ? ? ? ? ? ? : yes
>> fpu_exception ? : yes
>> cpuid level ? ? : 2
>> wp ? ? ? ? ? ? ?: yes
>> flags ? ? ? ? ? : fpu vme de pse tsc msr mce cx8 apic sep mtrr pge mca
>> cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
>> bogomips ? ? ? ?: 1198.79
>> clflush size ? ?: 64
>> power management:

FYI:
This warning still present in latest 2.6.30-rc8. I tried to find the
problem but failed.
Probably, someone experienced developer can help here and find the problem.

--
Best regards, Klimov Alexey