Re: [patch 2.6.29] usb: musb, stop using workqueue

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

 



On Thursday 26 March 2009, David Brownell wrote:
> From: Krogerus Heikki <heikki.krogerus@xxxxxxxxx>
> 
> We can stop using a workqueue and shrink resource usage:
> 
>  - Use sysfs_notify_dirent() instead of sysfs_notify()
>  - musb_check_mode() as replacement
> 


Shoot ... don't merge this one.  Sysfs *really* doesn't
like to be told to issue notifications from irq context.
Which seems pretty goofy to me.

This lockdep report also has an OMAP3 variant, same
complaint:  sysfs_notify_dirent() via musb_interrupt().


=================================
[ INFO: inconsistent lock state ]
2.6.29-davinci1 #648
---------------------------------
inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
S03udev/438 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (sysfs_open_dirent_lock){+...}, at: [<c00dc060>] sysfs_get_open_dirent+0x20/0xf0
{in-hardirq-W} state was registered at:
  [<c005f2b4>] mark_irqflags+0x74/0x138
  [<c0060c7c>] __lock_acquire+0x530/0x73c
  [<c0060ef0>] lock_acquire+0x68/0x7c
  [<c02bc0d4>] _spin_lock+0x48/0x58
  [<c00dc87c>] sysfs_notify_dirent+0x18/0x64
  [<c0205354>] musb_stage2_irq+0x2c0/0x304
  [<c0205888>] musb_interrupt+0x16c/0x194
  [<c02061d4>] davinci_interrupt+0x1dc/0x2ac
  [<c006b110>] handle_IRQ_event+0x2c/0x70
  [<c006cb90>] handle_edge_irq+0xf0/0x178
  [<c0024054>] __exception_text_start+0x54/0x6c
  [<c00249ac>] __irq_svc+0x4c/0x94
  [<c006b868>] __setup_irq+0x1b0/0x230
  [<c006ba28>] request_irq+0xcc/0x14c
  [<c001a28c>] davinci_mmcsd_probe+0x1cc/0x3a0
  [<c019f744>] platform_drv_probe+0x20/0x24
  [<c019e8d0>] really_probe+0xa4/0x158
  [<c019e9d8>] driver_probe_device+0x54/0x58
  [<c019ea44>] __driver_attach+0x68/0x8c
  [<c019de48>] bus_for_each_dev+0x4c/0x84
  [<c019e744>] driver_attach+0x20/0x28
  [<c019e3e4>] bus_add_driver+0xa4/0x180
  [<c019ecf8>] driver_register+0x98/0xcc
  [<c019f98c>] platform_driver_register+0x6c/0x88
  [<c019f9c0>] platform_driver_probe+0x18/0x90
  [<c0019dd8>] davinci_mmcsd_init+0x18/0x24
  [<c0024288>] do_one_initcall+0x58/0x190
  [<c0008618>] do_initcalls+0x1c/0x38
  [<c0008654>] do_basic_setup+0x20/0x24
  [<c00089fc>] kernel_init+0x44/0x90
  [<c003ce84>] do_exit+0x0/0x274
  [<ffffffff>] 0xffffffff
irq event stamp: 7318
hardirqs last  enabled at (7318): [<c005f724>] debug_check_no_locks_freed+0xa8/0xc8
hardirqs last disabled at (7317): [<c005f6c0>] debug_check_no_locks_freed+0x44/0xc8
softirqs last  enabled at (7301): [<c003ebe4>] __do_softirq+0x140/0x154
softirqs last disabled at (7284): [<c003ef70>] irq_exit+0x60/0xb4

other info that might help us debug this:
no locks held by S03udev/438.

stack backtrace:
[<c00294b0>] (dump_stack+0x0/0x14) from [<c005d624>] (print_usage_bug+0x170/0x1b4)
[<c005d4b4>] (print_usage_bug+0x0/0x1b4) from [<c005ea60>] (mark_lock_irq+0x4bc/0x8bc)
[<c005e5a4>] (mark_lock_irq+0x0/0x8bc) from [<c005f114>] (mark_lock+0x2b4/0x3e0)
 r7:c7915c80 r6:00000004 r5:00000010 r4:000000ca
[<c005ee60>] (mark_lock+0x0/0x3e0) from [<c005f338>] (mark_irqflags+0xf8/0x138)
 r9:c039e290 r8:c7807500 r7:c7915c80 r6:00000000 r5:c7915c80
r4:c7915960
[<c005f240>] (mark_irqflags+0x0/0x138) from [<c0060c7c>] (__lock_acquire+0x530/0x73c)
 r5:c7915960 r4:00000000
[<c006074c>] (__lock_acquire+0x0/0x73c) from [<c0060ef0>] (lock_acquire+0x68/0x7c)
[<c0060e88>] (lock_acquire+0x0/0x7c) from [<c02bc0d4>] (_spin_lock+0x48/0x58)
 r6:c7926700 r5:c00dc060 r4:c039e280
[<c02bc08c>] (_spin_lock+0x0/0x58) from [<c00dc060>] (sysfs_get_open_dirent+0x20/0xf0)
 r5:00000000 r4:c7926700
[<c00dc040>] (sysfs_get_open_dirent+0x0/0xf0) from [<c00dc250>] (sysfs_open_file+0x120/0x168)
 r7:c7812510 r6:c79f8300 r5:c03a172c r4:c7926700
[<c00dc130>] (sysfs_open_file+0x0/0x168) from [<c00953cc>] (__dentry_open+0x188/0x2a4)
[<c0095244>] (__dentry_open+0x0/0x2a4) from [<c00964d4>] (nameidata_to_filp+0x50/0x68)
[<c0096484>] (nameidata_to_filp+0x0/0x68) from [<c00a2e94>] (do_filp_open+0x2d0/0x678)
 r5:c7a0ded8 r4:00000000
[<c00a2bc4>] (do_filp_open+0x0/0x678) from [<c0095158>] (do_sys_open+0x5c/0xec)
[<c00950fc>] (do_sys_open+0x0/0xec) from [<c0095220>] (sys_open+0x24/0x28)
 r8:c0024f48 r7:00000005 r6:000d7b88 r5:00000241 r4:000001b6
[<c00951fc>] (sys_open+0x0/0x28) from [<c0024da0>] (ret_fast_syscall+0x0/0x2c)
usb usb1: uevent
usb 1-0:1.0: uevent
EXT3 FS on mmcblk0p1, internal journal
--
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