[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1273725751.21352.176.camel@pasglop>
Date: Thu, 13 May 2010 14:42:31 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc: saeed@...vell.com, nico@...vell.com, jamie@...reable.org,
linux-kernel@...r.kernel.org, jejb@...isc-linux.org,
santosh.shilimkar@...com, akpm@...ux-foundation.org,
linux-ext4@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: Rampant ext3/4 corruption on 2.6.34-rc7 with VIVT ARM (Marvell
88f5182)
On Thu, 2010-05-13 at 12:12 +0900, FUJITA Tomonori wrote:
> X86 OOSTORE uses a memory barrier dma_sync_single_for_device (seems
> that some mips archs also use it and do cache operations).
>
> I think that the DMA-API says that
>
> - dma_sync_single_for_device() makes sure the data ready for DMA.
>
> - dma_sync_single_for_cpu() makes sure that drivers doesn't get the
> stale data after DMA.
>
> I guess, it means if an architecture need a memory barrier (not only
> cache operations) to guarantee the above, the architecture needs to
> take care of it.
Right, but doing an indirect function pointer call for a memory barrier
in what can be a pretty hot code path doesn't sound like a great idea
if it can be avoided. I'd rather we define some inline that the arch
can stick in there if it wishes so.
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists