diff options
author | Christoph Hellwig <hch@lst.de> | 2018-12-25 17:27:14 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-02-20 15:27:00 +0100 |
commit | 91a6fda95cb67c94b887355690d1923a7eb6f630 (patch) | |
tree | 050d62146fb8da60eeeebbefc8a7e19f1de25e11 /kernel | |
parent | dma-mapping: move CONFIG_DMA_CMA to kernel/dma/Kconfig (diff) | |
download | linux-91a6fda95cb67c94b887355690d1923a7eb6f630.tar.xz linux-91a6fda95cb67c94b887355690d1923a7eb6f630.zip |
dma-mapping: remove dma_mark_declared_memory_occupied
This API is not used anywhere, so remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/dma/coherent.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/kernel/dma/coherent.c b/kernel/dma/coherent.c index 4b76aba574c2..1d12a31af6d7 100644 --- a/kernel/dma/coherent.c +++ b/kernel/dma/coherent.c @@ -137,29 +137,6 @@ void dma_release_declared_memory(struct device *dev) } EXPORT_SYMBOL(dma_release_declared_memory); -void *dma_mark_declared_memory_occupied(struct device *dev, - dma_addr_t device_addr, size_t size) -{ - struct dma_coherent_mem *mem = dev->dma_mem; - unsigned long flags; - int pos, err; - - size += device_addr & ~PAGE_MASK; - - if (!mem) - return ERR_PTR(-EINVAL); - - spin_lock_irqsave(&mem->spinlock, flags); - pos = PFN_DOWN(device_addr - dma_get_device_base(dev, mem)); - err = bitmap_allocate_region(mem->bitmap, pos, get_order(size)); - spin_unlock_irqrestore(&mem->spinlock, flags); - - if (err != 0) - return ERR_PTR(err); - return mem->virt_base + (pos << PAGE_SHIFT); -} -EXPORT_SYMBOL(dma_mark_declared_memory_occupied); - static void *__dma_alloc_from_coherent(struct dma_coherent_mem *mem, ssize_t size, dma_addr_t *dma_handle) { |