Re: msleep at ehci_bus_suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please forget it.

I haven't noticed spin_lock_irq at this function.

Peter


On Sun, Jan 26, 2014 at 4:10 PM, Peter Chen <peter.chen@xxxxxxxxxxxxx> wrote:
> Hi Alan,
>
> It seems the non-atomic sleep at ehci_bus_suspend during the system
> suspend process will cause kernel dump(see below), any suggestions?
>
> Peter
>
> root@freescale ~$ echo mem > /sys/power/state
> PM: Syncing filesystems ... done.
> Freezing user space processes ... (elapsed 0.001 seconds) done.
> Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
> ci_hdrc ci_hdrc.0: high speed connection
>
> =================================
> [ INFO: inconsistent lock state ]
> 3.13.0+ #78 Not tainted
> ---------------------------------
> inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
> kworker/u8:0/6 [HC0[0]:SC0[0]:HE1:SE1] takes:
>  (&(&ehci->lock)->rlock){?.-...}, at: [<80400104>] ehci_bus_suspend+0x4c/0x49c
> {IN-HARDIRQ-W} state was registered at:
>   [<80061880>] mark_lock+0x15c/0x6dc
>   [<800628e0>] __lock_acquire+0xae0/0x1cd0
>   [<80063fe8>] lock_acquire+0x68/0x7c
>   [<805eab7c>] _raw_spin_lock+0x34/0x44
>   [<80400574>] ehci_irq+0x20/0x324
>   [<803e9c98>] usb_hcd_irq+0x2c/0x40
>   [<8040b608>] host_irq+0x1c/0x20
>   [<80408124>] ci_irq+0x90/0x160
>   [<8006d9f0>] handle_irq_event_percpu+0x54/0x1a4
>   [<8006db84>] handle_irq_event+0x44/0x64
>   [<80070ce4>] handle_fasteoi_irq+0xc4/0x15c
>   [<8006d354>] generic_handle_irq+0x28/0x38
>   [<8000f1c8>] handle_IRQ+0x54/0xb4
>   [<80008644>] gic_handle_irq+0x30/0x64
>   [<80012fa4>] __irq_svc+0x44/0x5c
>   [<8014360c>] kernfs_remove_by_name_ns+0x38/0x8c
>   [<80141520>] sysfs_unmerge_group+0x48/0x60
>   [<80332344>] rpm_sysfs_remove+0x18/0x20
>   [<803366b8>] pm_runtime_no_callbacks+0x44/0x48
>   [<8040c298>] ci_hdrc_imx_probe+0x2a8/0x38c
>   [<8032ee8c>] platform_drv_probe+0x20/0x50
>   [<8032d2b8>] driver_probe_device+0x118/0x22c
>   [<8032d468>] __driver_attach+0x9c/0xa0
>   [<8032b9bc>] bus_for_each_dev+0x5c/0x90
>   [<8032cd8c>] driver_attach+0x20/0x28
>   [<8032c98c>] bus_add_driver+0xe0/0x1d8
>   [<8032db20>] driver_register+0x80/0xfc
>   [<8032e7d8>] __platform_driver_register+0x50/0x64
>   [<808006a8>] ci_hdrc_imx_driver_init+0x18/0x20
>   [<800088b4>] do_one_initcall+0x3c/0x168
>   [<807d2c74>] kernel_init_freeable+0x104/0x1d4
>   [<805df9ac>] kernel_init+0x10/0x118
>   [<8000e948>] ret_from_fork+0x14/0x2c
> irq event stamp: 4422
> hardirqs last  enabled at (4421): [<805eb2ac>] _raw_spin_unlock_irq+0x2c/0x34
> hardirqs last disabled at (4422): [<805eac90>] _raw_spin_lock_irq+0x20/0x58
> softirqs last  enabled at (3960): [<8002afe8>] __do_softirq+0x1c4/0x280
> softirqs last disabled at (3949): [<8002b3b4>] irq_exit+0xb0/0x114
>
> other info that might help us debug this:
>  Possible unsafe locking scenario:
>
>        CPU0
>        ----
>   lock(&(&ehci->lock)->rlock);
>   <Interrupt>
>     lock(&(&ehci->lock)->rlock);
>
>  *** DEADLOCK ***
>
> 4 locks held by kworker/u8:0/6:
>  #0:  (events_unbound){.+.+.+}, at: [<8003ccc0>] process_one_work+0x130/0x438
>  #1:  ((&entry->work)){+.+.+.}, at: [<8003ccc0>] process_one_work+0x130/0x438
>  #2:  (&__lockdep_no_validate__){......}, at: [<803340b8>] __device_suspend+0xb8/0x220
>  #3:  (&(&ehci->lock)->rlock){?.-...}, at: [<80400104>] ehci_bus_suspend+0x4c/0x49c
>
> stack backtrace:
> CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 3.13.0+ #78
> Workqueue: events_unbound async_run_entry_fn
> Backtrace:
> [<80012220>] (dump_backtrace+0x0/0x10c) from [<800123c0>] (show_stack+0x18/0x1c)
>  r6:bf87b3f8 r5:bf87af80 r4:00000000 r3:bf87af80
> [<800123a8>] (show_stack+0x0/0x1c) from [<805e4708>] (dump_stack+0x78/0x94)
> [<805e4690>] (dump_stack+0x0/0x94) from [<805e2590>] (print_usage_bug+0x268/0x2d8)
>  r4:80927080 r3:bf87af80
> [<805e2328>] (print_usage_bug+0x0/0x2d8) from [<80061cd8>] (mark_lock+0x5b4/0x6dc)
> [<80061724>] (mark_lock+0x0/0x6dc) from [<800647e8>] (mark_held_locks+0xa0/0x138)
> [<80064748>] (mark_held_locks+0x0/0x138) from [<80064930>] (trace_hardirqs_on_caller+0xb0/0x1cc)
> [<80064880>] (trace_hardirqs_on_caller+0x0/0x1cc) from [<80064a60>] (trace_hardirqs_on+0x14/0x18)
>  r7:80829db0 r6:815e4b40 r5:bee2ae00 r4:815e4b40
> [<80064a4c>] (trace_hardirqs_on+0x0/0x18) from [<805eb2ac>] (_raw_spin_unlock_irq+0x2c/0x34)
> [<805eb280>] (_raw_spin_unlock_irq+0x0/0x34) from [<8004bd04>] (finish_task_switch+0x8c/0x13c)
>  r4:00000000 r3:bf87af80
> [<8004bc78>] (finish_task_switch+0x0/0x13c) from [<805e697c>] (__schedule+0x210/0x5d0)
> [<805e676c>] (__schedule+0x0/0x5d0) from [<805e6e38>] (schedule+0x38/0x88)
> [<805e6e00>] (schedule+0x0/0x88) from [<805e61e4>] (schedule_timeout+0x10c/0x18c)
> [<805e60d8>] (schedule_timeout+0x0/0x18c) from [<805e628c>] (schedule_timeout_uninterruptible+0x28/0x2c)
> [<805e6264>] (schedule_timeout_uninterruptible+0x0/0x2c) from [<80031584>] (msleep+0x1c/0x28)
> [<80031568>] (msleep+0x0/0x28) from [<804001f8>] (ehci_bus_suspend+0x140/0x49c)
> [<804000b8>] (ehci_bus_suspend+0x0/0x49c) from [<803ec52c>] (hcd_bus_suspend+0x60/0x100)
> [<803ec4cc>] (hcd_bus_suspend+0x0/0x100) from [<803f8794>] (generic_suspend+0x38/0x3c)
>  r7:00000000 r6:00000001 r5:ffffffff r4:bf0d4c00
> [<803f875c>] (generic_suspend+0x0/0x3c) from [<803f081c>] (usb_suspend_both+0x10c/0x1a4)
> [<803f0710>] (usb_suspend_both+0x0/0x1a4) from [<803f10c8>] (usb_suspend+0xf4/0x118)
> [<803f0fd4>] (usb_suspend+0x0/0x118) from [<803e2920>] (usb_dev_suspend+0x14/0x18)
> [<803e290c>] (usb_dev_suspend+0x0/0x18) from [<80333bac>] (dpm_run_callback.isra.12+0x34/0x6c)
> [<80333b78>] (dpm_run_callback.isra.12+0x0/0x6c) from [<8033410c>] (__device_suspend+0x10c/0x220)
>  r9:00000002 r8:00000000 r6:00000002 r5:80dac34c r4:bf0d4c68
> [<80334000>] (__device_suspend+0x0/0x220) from [<80334240>] (async_suspend+0x20/0x94)
>  r7:bf82f400 r6:8086cb60 r5:bf0d4c68 r4:80dac34c
> [<80334220>] (async_suspend+0x0/0x94) from [<80049e9c>] (async_run_entry_fn+0x48/0x190)
>  r6:8086cb60 r5:beef9900 r4:beef9910 r3:00000000
> [<80049e54>] (async_run_entry_fn+0x0/0x190) from [<8003cd34>] (process_one_work+0x1a4/0x438)
>  r9:00000002 r8:00000000 r7:bf82f400 r6:bf80dc00 r5:beef9910
> r4:bf82d980
> [<8003cb90>] (process_one_work+0x0/0x438) from [<8003da5c>] (worker_thread+0x120/0x3e4)
> [<8003d93c>] (worker_thread+0x0/0x3e4) from [<80044070>] (kthread+0xcc/0xe8)
> [<80043fa4>] (kthread+0x0/0xe8) from [<8000e948>] (ret_from_fork+0x14/0x2c)
>  r7:00000000 r6:00000000 r5:80043fa4 r4:bf840680
> PM: suspend of devices complete after 530.175 msecs
> PM: suspend devices took 0.540 seconds
> PM: late suspend of devices complete after 1.038 msecs
> PM: noirq suspend of devices complete after 1.087 msecs
> Disabling non-boot CPUs ...
> CPU1: shutdown
> CPU2: shutdown
> CPU3: shutdown
>
> --
>
> Best Regards,
> Peter Chen
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
BR,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux