summaryrefslogtreecommitdiffstats
path: root/kernel/dma/mapping.c
Commit message (Collapse)AuthorAgeFilesLines
* dma-mapping: support non-coherent devices in dma_common_get_sgtableChristoph Hellwig2018-09-201-7/+16
| | | | | | | | | We can use the arch_dma_coherent_to_pfn hook to provide a ->get_sgtable implementation. Note that this isn't an endorsement of this interface (which is a horrible bad idea), but it is required to move arm64 over to the generic code without a loss of functionality. Signed-off-by: Christoph Hellwig <hch@lst.de>
* dma-mapping: consolidate the dma mmap implementationsChristoph Hellwig2018-09-201-11/+21
| | | | | | | | | | | | | | | | | The only functional differences (modulo a few missing fixes in the arch code) is that architectures without coherent caches need a hook to convert a virtual or dma address into a pfn, given that we don't have the kernel linear mapping available for the otherwise easy virt_to_page call. As a side effect we can support mmap of the per-device coherent area even on architectures not providing the callback, and we make previous dangerous default methods dma_common_mmap actually save for non-coherent architectures by rejecting it without the right helper. In addition to that we need a hook so that some architectures can override the protection bits when mmaping a dma coherent allocations. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Paul Burton <paul.burton@mips.com> # MIPS parts
* dma-mapping: remove dma_deconfigureChristoph Hellwig2018-09-081-6/+0
| | | | | | | | This goes through a lot of hooks just to call arch_teardown_dma_ops. Replace it with a direct call instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
* dma-mapping: remove dma_configureChristoph Hellwig2018-09-081-10/+0
| | | | | | | | There is no good reason for this indirection given that the method always exists. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
* dma-mapping: move all DMA mapping code to kernel/dmaChristoph Hellwig2018-06-141-0/+345
Currently the code is split over various files with dma- prefixes in the lib/ and drives/base directories, and the number of files keeps growing. Move them into a single directory to keep the code together and remove the file name prefixes. To match the irq infrastructure this directory is placed under the kernel/ directory. Signed-off-by: Christoph Hellwig <hch@lst.de>
OpenPOWER on IntegriCloud