linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 00/12] UBS: Cleanup in_interupt/in_irq/in_atomic() usage
@ 2020-10-14 14:52 Thomas Gleixner
  2020-10-14 14:52 ` [patch 01/12] USB: sisusbvga: Make console support depend on BROKEN Thomas Gleixner
                   ` (12 more replies)
  0 siblings, 13 replies; 27+ messages in thread
From: Thomas Gleixner @ 2020-10-14 14:52 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Thomas Winischhofer, Greg Kroah-Hartman,
	linux-usb, Ahmed S. Darwish, Sebastian Andrzej Siewior,
	Johan Hovold, Mathias Nyman, Valentina Manea, Shuah Khan,
	Alan Stern, linux-omap, Kukjin Kim, Krzysztof Kozlowski,
	linux-arm-kernel, linux-samsung-soc, Felipe Balbi, Duncan Sands

Folks,

in the discussion about preempt count consistency accross kernel configurations:

  https://lore.kernel.org/r/20200914204209.256266093@linutronix.de/

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.

With the following series applied, USB is clean.

Thanks,

	tglx
---
 atm/usbatm.c             |    2 
 core/buffer.c            |    6 +-
 core/hcd-pci.c           |    6 +-
 core/hcd.c               |   21 ++++----
 core/hub.c               |    3 -
 core/message.c           |   35 +++++++++-----
 core/usb.c               |    4 -
 gadget/udc/core.c        |    2 
 gadget/udc/dummy_hcd.c   |    5 +-
 gadget/udc/pxa27x_udc.c  |   19 ++++---
 host/ehci-fsl.c          |    9 +--
 host/ehci-pmcmsp.c       |   15 +++---
 host/isp1362.h           |    5 +-
 host/ohci-at91.c         |   11 +++-
 host/ohci-omap.c         |    7 +-
 host/ohci-pxa27x.c       |   11 ++--
 host/ohci-s3c2410.c      |   12 ++---
 host/xhci-mem.c          |    2 
 host/xhci.c              |    6 --
 misc/sisusbvga/Kconfig   |    2 
 serial/digi_acceleport.c |    7 +-
 serial/keyspan_pda.c     |  112 ++++++++++++++++++++---------------------------
 usbip/usbip_common.c     |    5 --
 23 files changed, 156 insertions(+), 151 deletions(-)

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-10-23 13:37 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 14:52 [patch 00/12] UBS: Cleanup in_interupt/in_irq/in_atomic() usage Thomas Gleixner
2020-10-14 14:52 ` [patch 01/12] USB: sisusbvga: Make console support depend on BROKEN Thomas Gleixner
2020-10-14 14:52 ` [patch 02/12] USB: serial: keyspan_pda: Replace in_interrupt() usage Thomas Gleixner
2020-10-14 14:52 ` [patch 03/12] USB: serial: keyspan_pda: Consolidate room query Thomas Gleixner
2020-10-14 16:14   ` Alan Stern
2020-10-14 16:17     ` Thomas Gleixner
2020-10-14 16:27     ` Sebastian Andrzej Siewior
2020-10-14 16:34       ` Alan Stern
2020-10-14 16:44         ` Sebastian Andrzej Siewior
2020-10-14 14:52 ` [patch 04/12] USB: serial: digi_acceleport: Remove in_interrupt() usage Thomas Gleixner
2020-10-14 14:52 ` [patch 05/12] usb: xhci: Remove in_interrupt() checks Thomas Gleixner
2020-10-23 13:38   ` Mathias Nyman
2020-10-14 14:52 ` [patch 06/12] usb: host: isp1362: Replace in_interrupt() usage Thomas Gleixner
2020-10-14 14:52 ` [patch 07/12] usbip: Remove in_interrupt() check Thomas Gleixner
2020-10-14 15:45   ` Shuah Khan
2020-10-14 14:52 ` [patch 08/12] usb: hosts: Remove in_interrupt() from comments Thomas Gleixner
2020-10-14 15:24   ` Krzysztof Kozlowski
2020-10-14 16:20   ` Alan Stern
2020-10-14 14:52 ` [patch 09/12] usb: gadget: pxa27x_udc: Replace in_interrupt() usage in comments Thomas Gleixner
2020-10-14 14:52 ` [patch 10/12] usb: gadget: udc: Remove in_interrupt()/in_irq() from comments Thomas Gleixner
2020-10-14 16:22   ` Alan Stern
2020-10-14 14:52 ` [patch 11/12] usb: core: Replace in_interrupt() in comments Thomas Gleixner
2020-10-14 16:27   ` Alan Stern
2020-10-14 16:41     ` Sebastian Andrzej Siewior
2020-10-14 18:13       ` Alan Stern
2020-10-14 14:52 ` [patch 12/12] usb: atm: Replace in_interrupt() usage in comment Thomas Gleixner
2020-10-23  8:01 ` [patch 00/12] UBS: Cleanup in_interupt/in_irq/in_atomic() usage Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).