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

Ian Campbell ijc at hellion.org.uk
Mon Apr 28 21:34:42 CEST 2014


On Mon, 2014-04-28 at 12:05 +0000, Alexey Brodkin wrote:

> And in this situation IMHO the only safe solution could be in proper
> design of data layout. In other words we need to keep independent data
> blocks aligned to cache line.
> 
> And as you may see from "designware.h" buffer descriptor structure is
> aligned:

There's no point in taking all this care if you then go and flush
subfields, as the driver does, since they are not necessarily going to
have the required alignment. That was the entire point of this patch!

I'm going to do the roundup thing you asked for, even though it seems
like a pointless optimisation to me given the context.

> ==============
> struct dmamacdescr {
> 	u32 txrx_status;
> 	u32 dmamac_cntl;
> 	void *dmamac_addr;
> 	struct dmamacdescr *dmamac_next;
> } __aligned(ARCH_DMA_MINALIGN);
> ==============
> 
> Regards,
> Alexey
> 
> 
> 




More information about the U-Boot mailing list