[U-Boot] [PATCH v3 1/2] net: designware: fix descriptor layout and warnings on 64-bit archs

Beniamino Galvani b.galvani at gmail.com
Mon Apr 11 22:46:20 CEST 2016


On Mon, Apr 11, 2016 at 01:59:59AM +0200, Marek Vasut wrote:
> 
> This looks more like silencing the warning by a forced cast.
> The pointer should most likely be sanity-checked to make sure it's in
> 4GiB address space at least. I am worried such forced casts will bite
> us in the long run.

Yes, this patch assumes that addresses of buffers and descriptors are
in the first 4GiB of address space. AFAIU this should be a safe
premise for current SoCs, since the physical memory is always mapped
within the 32bit addressable range; other drivers (see for example
sunxi_mmc) do a similar assumption.

So, right now I don't think a check is strictly needed, but to be
future-proof probably it wouldn't hurt either.

Beniamino


More information about the U-Boot mailing list