linux/drivers/virtio
Cornelia Huck ab7a2375fb virtio: hint if callbacks surprisingly might sleep
A virtio transport is free to implement some of the callbacks in
virtio_config_ops in a matter that they cannot be called from
atomic context (e.g. virtio-ccw, which maps a lot of the callbacks
to channel I/O, which is an inherently asynchronous mechanism).
This can be very surprising for developers using the much more
common virtio-pci transport, just to find out that things break
when used on s390.

The documentation for virtio_config_ops now contains a comment
explaining this, but it makes sense to add a might_sleep() annotation
to various wrapper functions in the virtio core to avoid surprises
later.

Note that annotations are NOT added to two classes of calls:
- direct calls from device drivers (all current callers should be
  fine, however)
- calls which clearly won't be made from atomic context (such as
  those ultimately coming in via the driver core)

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-03-06 11:19:57 -05:00
..
Kconfig
Makefile
virtio_balloon.c virtio_balloon: remove the unnecessary 0-initialization 2019-03-06 11:19:33 -05:00
virtio_input.c
virtio_mmio.c virtio: don't allocate vqs when names[i] = NULL 2019-01-14 20:15:19 -05:00
virtio_pci_common.c virtio_pci: use queue idx instead of array idx to set up the vq 2019-01-14 20:15:18 -05:00
virtio_pci_common.h
virtio_pci_legacy.c virtio: remove deprecated VIRTIO_PCI_CONFIG() 2018-12-19 18:23:49 -05:00
virtio_pci_modern.c
virtio_ring.c virtio: Introduce virtio_max_dma_size() 2019-03-06 11:19:15 -05:00
virtio.c virtio: hint if callbacks surprisingly might sleep 2019-03-06 11:19:57 -05:00