Re: [RFC PATCH 05/15] mips: fix dma_sync_* stuff for MIPS64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 17, 2018 at 04:58:48PM +0300, Peter Mamonov wrote:
> Signed-off-by: Peter Mamonov <pmamonov@xxxxxxxxx>
> ---
>  arch/mips/include/asm/dma-mapping.h |  2 +-
>  arch/mips/include/asm/io.h          |  4 ++--
>  arch/mips/lib/c-r4k.c               | 26 +++++++++++++-------------
>  arch/mips/lib/dma-default.c         |  6 ++++--
>  4 files changed, 20 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
> index c71a08703..d4cbb3cac 100644
> --- a/arch/mips/include/asm/dma-mapping.h
> +++ b/arch/mips/include/asm/dma-mapping.h
> @@ -19,7 +19,7 @@ static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle)
>  	if (dma_handle)
>  		*dma_handle = CPHYSADDR(ret);
>  
> -	dma_flush_range((unsigned long)ret, (unsigned long)(ret + size));
> +	dma_flush_range(ret, ret + size);
>  
>  	return (void *)CKSEG1ADDR(ret);
>  }
> diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
> index 5a4cbf564..07b337e76 100644
> --- a/arch/mips/include/asm/io.h
> +++ b/arch/mips/include/asm/io.h
> @@ -15,8 +15,8 @@
>  #include <asm/addrspace.h>
>  #include <asm/byteorder.h>
>  
> -void dma_flush_range(unsigned long, unsigned long);
> -void dma_inv_range(unsigned long, unsigned long);
> +void dma_flush_range(void *, void *);
> +void dma_inv_range(void *, void *);

Why is this changed? unsigned long should normally be wide enough to
hold an address.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux