[PATCH] net: zynq_gem: Use ulong instead of u32 data type

Michal Simek monstr at monstr.eu
Fri Feb 28 12:15:57 CET 2020


čt 16. 1. 2020 v 8:54 odesílatel Michal Simek <michal.simek at xilinx.com> napsal:
>
> From: T Karthik Reddy <t.karthik.reddy at xilinx.com>
>
> flush_dcache_range() expects unsigned long in the arguments. Here u32
> variable is unable to hold the higher address value when ddr mapped
> to higher addresses & flushing lower address dchache range instead
> which is unmapped causing to crash.
>
> Signed-off-by: T Karthik Reddy <t.karthik.reddy at xilinx.com>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
>  drivers/net/zynq_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index c3fe8e3c563f..879129653df3 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -653,7 +653,7 @@ static int zynq_gem_probe(struct udevice *dev)
>                 return -ENOMEM;
>
>         memset(priv->rxbuffers, 0, RX_BUF * PKTSIZE_ALIGN);
> -       u32 addr = (ulong)priv->rxbuffers;
> +       ulong addr = (ulong)priv->rxbuffers;
>         flush_dcache_range(addr, addr + roundup(RX_BUF * PKTSIZE_ALIGN, ARCH_DMA_MINALIGN));
>         barrier();
>
> --
> 2.25.0
>

Applied.
M


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


More information about the U-Boot mailing list