[U-Boot] [PATCH 2/3] net/designware: invalidate entire descriptor in dw_eth_send

Stefan Monnier monnier at iro.umontreal.ca
Fri Apr 25 02:58:51 CEST 2014


> 1. Don't invalidate "sizeof(struct dmamacdescr)" but only
> "roundup(sizeof(desc_p->txrx_status), ARCH_DMA_MINALIGN))".

I'm not sure I like this: if ARCH_DMA_MINALIGN is "too large" and ends
up invalidating more than the struct, it could be an error, so it's
safer to ask it to invalidate the struct (which we know can be safely
invalidates).

If invalidate_dcache_range is used "often", then I'd suggest to change
its API so it receives 2 bounds: the one that has to be invalidated
and the surrounding one that can safely be invalidated.


        Stefan



More information about the U-Boot mailing list