dma-direct: make uncached_kernel_address more general
Rename the symbol to arch_dma_set_uncached, and pass a size to it as well as allow an error return. That will allow reusing this hook for in-place pagetable remapping. As the in-place remap doesn't always require an explicit cache flush, also detangle ARCH_HAS_DMA_PREP_COHERENT from ARCH_HAS_DMA_SET_UNCACHED. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
This commit is contained in:
@@ -49,7 +49,7 @@ void arch_dma_prep_coherent(struct page *page, size_t size)
|
||||
dma_cache_wback_inv((unsigned long)page_address(page), size);
|
||||
}
|
||||
|
||||
void *uncached_kernel_address(void *addr)
|
||||
void *arch_dma_set_uncached(void *addr, size_t size)
|
||||
{
|
||||
return (void *)(__pa(addr) + UNCAC_BASE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user