2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/dma/ioat
Krister Johansen 21d25f6a42 dmaengine: iota: ioat_alloc_chan_resources should not perform sleeping allocations.
On a kernel with DEBUG_LOCKS, ioat_free_chan_resources triggers an
in_interrupt() warning.  With PROVE_LOCKING, it reports detecting a
SOFTIRQ-safe to SOFTIRQ-unsafe lock ordering in the same code path.

This is because dma_generic_alloc_coherent() checks if the GFP flags
permit blocking.  It allocates from different subsystems if blocking is
permitted.  The free path knows how to return the memory to the correct
allocator.  If GFP_KERNEL is specified then the alloc and free end up
going through cma_alloc(), which uses mutexes.

Given that ioat_free_chan_resources() can be called in interrupt
context, ioat_alloc_chan_resources() must specify GFP_NOWAIT so that the
allocations do not block and instead use an allocator that uses
spinlocks.

Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2017-01-10 10:41:51 +05:30
..
dca.c dmaengine: ioatdma: constify dca_ops structures 2015-11-16 09:27:32 +05:30
dma.c Merge branch 'topic/ioat' into for-linus 2016-12-14 09:06:23 +05:30
dma.h dmaengine: IOATDMA: revise channel reset workaround on CB3.3 platforms 2016-03-11 07:55:08 +05:30
hw.h dmaengine: ioatdma: Add Skylake PCI Dev ID 2017-01-02 08:12:59 +05:30
init.c dmaengine: iota: ioat_alloc_chan_resources should not perform sleeping allocations. 2017-01-10 10:41:51 +05:30
Makefile dmaengine: ioatdma: removal of dma_v3.c and relevant ioat3 references 2015-08-17 13:37:30 +05:30
prep.c dmaengine: ioatdma: Squelch framesize warnings 2016-01-25 09:49:55 +05:30
registers.h i7300_idle: Remove this driver 2016-11-18 12:07:56 +01:00
sysfs.c dmaengine: ioatdma: move all sysfs related code 2015-08-17 13:37:30 +05:30