Re: [PATCH 04/25] iommu/dma: Remove the flush_page callback
From: Catalin Marinas
Date: Fri May 03 2019 - 07:45:26 EST
On Fri, May 03, 2019 at 12:43:35PM +0100, Catalin Marinas wrote:
> On Tue, Apr 30, 2019 at 06:51:53AM -0400, Christoph Hellwig wrote:
> > We now have a arch_dma_prep_coherent architecture hook that is used
> > for the generic DMA remap allocator, and we should use the same
> > interface for the dma-iommu code.
> >
> > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > Reviewed-by: Robin Murphy <robin.murphy@xxxxxxx>
> > ---
> > arch/arm64/mm/dma-mapping.c | 8 +-------
> > drivers/iommu/dma-iommu.c | 8 +++-----
> > include/linux/dma-iommu.h | 3 +--
> > 3 files changed, 5 insertions(+), 14 deletions(-)
> >
> > diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
> > index 674860e3e478..10a8852c8b6a 100644
> > --- a/arch/arm64/mm/dma-mapping.c
> > +++ b/arch/arm64/mm/dma-mapping.c
> > @@ -104,12 +104,6 @@ arch_initcall(arm64_dma_init);
> > #include <linux/platform_device.h>
> > #include <linux/amba/bus.h>
> >
> > -/* Thankfully, all cache ops are by VA so we can ignore phys here */
> > -static void flush_page(struct device *dev, const void *virt, phys_addr_t phys)
> > -{
> > - __dma_flush_area(virt, PAGE_SIZE);
> > -}
>
> Rather than removing, should this not become arch_dma_prep_coherent()?
> With patch 2 selecting the corresponding Kconfig option, I think with
> this patch you'd get a build error (haven't tried).
Ah, sorry, it was already there.
Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>