[PATCH] net: rtl8169: remove unnecessary cache maintenance

Lucas Stach l.stach at pengutronix.de
Tue Jan 6 03:11:34 PST 2015


Am Dienstag, den 06.01.2015, 13:56 +0300 schrieb Antony Pavlov:
> On Mon, 05 Jan 2015 18:37:29 +0100
> Lucas Stach <dev at lynxeye.de> wrote:
> 
> > Am Montag, den 05.01.2015, 20:19 +0300 schrieb Antony Pavlov:
> > > On Sun,  4 Jan 2015 22:09:05 +0100
> > > Lucas Stach <dev at lynxeye.de> wrote:
> > > 
> > > I suppose that this patch can make problems on MIPS with explicid cache handling.
> > > 
> > How would it?
> > This driver is ARM only for now (as we are using ARM MMU functions to
> > flush buffers) until someone gets around to properly implement generic
> > dma sync ops.
> 
> Anyway it is reasonable to add 'depends on ARM' to 'config DRIVER_NET_RTL8169'
> record in drivers/net/Kconfig.
> 
Yes, will do.

> > But even then MIPS knows about uncached memory types which is exactly
> > what should be returned for a dma coherent memory allocation.
> 
> Alas! We can't just add 'volatile' modifier to make pointer uncached on MIPS in general case.

This is not how it works. The memory for the buffer descriptors isn't
general malloc memory, but allocated with dma_alloc_coherent, which
makes sure the memory is uncached. This works on both ARM and MIPS.

Regards,
Lucas

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |




More information about the barebox mailing list