Skip to content

USB: Cleanup in_interupt/in_irq/in_atomic() usage

Thomas Gleixner linux-arm-kernel linux-omap linux-samsung-soc linux-usb lkml stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 11 repliesIn review
  2. v112 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- Fix the keyspan_pda query buffer properly

- Seperate the static change from the comments changes

- Address review feedback vs. comments

- Fix the typo in isp1362

- Collected acks/reviewed-by tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13USB: sisusbvga: Make console support depend on BROKENdrivers/usb/misc/sisusbvga/Kconfig+1 -10 replies
2/13USB: serial: keyspan_pda: Replace in_interrupt() usagedrivers/usb/serial/keyspan_pda.c+6 -43 replies
3/13USB: serial: keyspan_pda: Consolidate room querydrivers/usb/serial/keyspan_pda.c+49 -591 reply
4/13USB: serial: digi_acceleport: Remove in_interrupt() usagedrivers/usb/serial/digi_acceleport.c+4 -33 replies
5/13usb: xhci: Remove in_interrupt() checksdrivers/usb/host/xhci-mem.c drivers/usb/host/xhci.c+3 -50 replies
6/13usb: host: isp1362: Replace in_interrupt() usagedrivers/usb/host/isp1362.h+3 -21 reply
7/13usbip: Remove in_interrupt() checkdrivers/usb/usbip/usbip_common.c+0 -50 replies
8/13usb: hosts: Remove in_interrupt() from commentsdrivers/usb/host/ehci-fsl.c drivers/usb/host/ehci-pmcmsp.c drivers/usb/host/ohci-at91.c +3 more+37 -261 reply
9/13USB: host: ehci-pmcmsp: Cleanup usb_hcd_msp_remove()drivers/usb/host/ehci-pmcmsp.c+2 -21 reply
10/13usb: gadget: pxa27x_udc: Replace in_interrupt() usage in commentsdrivers/usb/gadget/udc/pxa27x_udc.c+10 -90 replies
11/13usb: gadget: udc: Remove in_interrupt()/in_irq() from commentsdrivers/usb/gadget/udc/core.c drivers/usb/gadget/udc/dummy_hcd.c+4 -41 reply
12/13usb: core: Replace in_interrupt() in commentsdrivers/usb/core/buffer.c drivers/usb/core/hcd-pci.c drivers/usb/core/hcd.c +3 more+51 -291 reply
13/13usb: atm: Replace in_interrupt() usage in commentdrivers/usb/atm/usbatm.c+1 -11 reply

Reviews trailers per patch

5 of 13 patches have a Reviewed-by or Acked-by.

PatchShuah KhanKrzysztof KozlowskiAlan Stern
1/13
2/13
3/13
4/13
5/13
6/13
7/13A-b
8/13A-b A-b
9/13A-b
10/13
11/13A-b
12/13A-b
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [patch V2 00/13] USB: Cleanup in_interupt/in_irq/in_atomic() usage

Folks,

in the discussion about preempt count consistency accross kernel configurations:

https://lore.kernel.org/r/[email protected]/

Linus clearly requested that code in drivers and libraries which changes behaviour based on execution context should either be split up so that e.g. task context invocations and BH invocations have different interfaces or if that's not possible the context information has to be provided by the caller which knows in which context it is executing.

This includes conditional locking, allocation mode (GFP_*) decisions and avoidance of code paths which might sleep.

In the long run, usage of 'preemptible, in_*irq etc.' should be banned from driver code completely.

The usage of such constructs in USB is rather limited. Most of it is in debug code and (misleading) comments. But of course there are also a few few bugs including one unfixable.

That's an update to V1 of this series which can be found here:

https://lore.kernel.org/r/[email protected]

Changes vs. V1:

- Fix the keyspan_pda query buffer properly

- Seperate the static change from the comments changes

- Address review feedback vs. comments

- Fix the typo in isp1362

- Collected acks/reviewed-by tags

Thanks,

tglx