]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'dmaengine-4.12-rc1' of git://git.infradead.org/users/vkoul/slave-dma
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 May 2017 22:40:28 +0000 (15:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 May 2017 22:40:28 +0000 (15:40 -0700)
Pull dmaengine updates from Vinod Koul:
 "This time again a smaller update consisting of:

   - support for TI DA8xx dma controller and updates to the cppi driver

   - updates on bunch of drivers like xilinx, pl08x, stm32-dma, mv_xor,
     ioat, dmatest"

* tag 'dmaengine-4.12-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (35 commits)
  dmaengine: pl08x: remove lock documentation
  dmaengine: pl08x: fix pl08x_dma_chan_state documentation
  dmaengine: pl08x: Use the BIT() macro consistently
  dmaengine: pl080: Fix some missing kerneldoc
  dmaengine: pl080: Cut some unused defines
  dmaengine: dmatest: Add check for supported buffer count (sg_buffers)
  dmaengine: dmatest: Select DMA_ENGINE_RAID as its needed for the slave_sg test
  dmaengine: virt-dma: Convert to use list_for_each_entry_safe()
  dma-debug: use offset_in_page() macro
  dmaengine: mv_xor: use offset_in_page() macro
  dmaengine: dmatest: use offset_in_page() macro
  dmaengine: sun4i: fix invalid argument
  dmaengine: ioat: use setup_timer
  dmaengine: cppi41: Fix an Oops happening in cppi41_dma_probe()
  dmaengine: pl330: remove pdata based initialization
  dmaengine: cppi: fix build error due to bad variable
  dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped
  dmaengine: cppi41: use managed functions devm_*()
  dmaengine: cppi41: fix cppi41_dma_tx_status() logic
  dmaengine: qcom_hidma: pause the channel on shutdown
  ...

1  2 
lib/dma-debug.c

diff --combined lib/dma-debug.c
index fe4d50c992df618a914e4696d7f698e4e8b76c83,cd5a5a426ef1f219e5091bacb77849c510d62241..ea4cc3dde4f1bac9f3b8337fdac95408cb3e8b35
@@@ -942,17 -942,21 +942,17 @@@ static int device_dma_allocations(struc
        unsigned long flags;
        int count = 0, i;
  
 -      local_irq_save(flags);
 -
        for (i = 0; i < HASH_SIZE; ++i) {
 -              spin_lock(&dma_entry_hash[i].lock);
 +              spin_lock_irqsave(&dma_entry_hash[i].lock, flags);
                list_for_each_entry(entry, &dma_entry_hash[i].list, list) {
                        if (entry->dev == dev) {
                                count += 1;
                                *out_entry = entry;
                        }
                }
 -              spin_unlock(&dma_entry_hash[i].lock);
 +              spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags);
        }
  
 -      local_irq_restore(flags);
 -
        return count;
  }
  
@@@ -1498,7 -1502,7 +1498,7 @@@ void debug_dma_alloc_coherent(struct de
        entry->type      = dma_debug_coherent;
        entry->dev       = dev;
        entry->pfn       = page_to_pfn(virt_to_page(virt));
-       entry->offset    = (size_t) virt & ~PAGE_MASK;
+       entry->offset    = offset_in_page(virt);
        entry->size      = size;
        entry->dev_addr  = dma_addr;
        entry->direction = DMA_BIDIRECTIONAL;
@@@ -1514,7 -1518,7 +1514,7 @@@ void debug_dma_free_coherent(struct dev
                .type           = dma_debug_coherent,
                .dev            = dev,
                .pfn            = page_to_pfn(virt_to_page(virt)),
-               .offset         = (size_t) virt & ~PAGE_MASK,
+               .offset         = offset_in_page(virt),
                .dev_addr       = addr,
                .size           = size,
                .direction      = DMA_BIDIRECTIONAL,