[PATCH 25/28] ARM: mmu: Use dma_inv_range() in dma_sync_single_for_cpu()

Lucas Stach l.stach at pengutronix.de
Wed May 9 01:49:02 PDT 2018


Am Dienstag, den 08.05.2018, 14:29 -0700 schrieb Andrey Smirnov:
> The code in the if () statement is identical to already existing
> dma_inv_rand(). Use it instead.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>

Reviewed-by: Lucas Stach <l.stach at pengutronix.de>

> ---
>  arch/arm/cpu/mmu.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
> index ceb854ac8..b14a869af 100644
> --- a/arch/arm/cpu/mmu.c
> +++ b/arch/arm/cpu/mmu.c
> @@ -548,11 +548,8 @@ void dma_free_coherent(void *mem, dma_addr_t dma_handle, size_t size)
>  void dma_sync_single_for_cpu(dma_addr_t address, size_t size,
> >  			     enum dma_data_direction dir)
>  {
> > -	if (dir != DMA_TO_DEVICE) {
> > -		if (outer_cache.inv_range)
> > -			outer_cache.inv_range(address, address + size);
> > -		__dma_inv_range(address, address + size);
> > -	}
> > +	if (dir != DMA_TO_DEVICE)
> > +		dma_inv_range(address, address + size);
>  }
>  
>  void dma_sync_single_for_device(dma_addr_t address, size_t size,



More information about the barebox mailing list