From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 15 Jun 2004 23:40:02 +0200 (CEST) From: Guennadi Liakhovetski Subject: Re: [linux-usb-devel] Patch for UHCI driver (from kernel 2.6.6). In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: owner-linux-mm@kvack.org Return-Path: To: Alan Stern Cc: David Brownell , Alan Cox , Nicolas DET , USB development list , linux-mm@kvack.org List-ID: On Tue, 15 Jun 2004, Alan Stern wrote: > On Mon, 14 Jun 2004, David Brownell wrote: > >> Seems like the dma_alloc_coherent() API spec can't be >> implemented on such machines then, since it's defined >> to return memory(*) such that: >> >> ... a write by either the device or the processor >> can immediately be read by the processor or device >> without having to worry about caching effects. >> >> Seems like the documentation should change to explain >> under what circumstances "coherent" memory will exhibit >> cache-incoherent behavior, and how to cope with that. >> (Then lots of drivers would need to change.) >> >> OR ... maybe the bug is just that those PPC processors >> can't/shouldn't claim to implement that API. At which >> point all drivers relying on that API (including all >> the USB HCDs and many of the USB drivers) stop working. >> >> - Dave >> >> (*) DMA-API.txt uses two terms for this: "coherent" and "consistent". >> DMA-mapping.txt only uses "consistent". > > That text strikes me as rather ambiguous. Maybe it's intended to mean > that a write by either side can be read immediately by the other side, and > the values read will be the ones written (i.e., the read won't get stale > data from some cache). It doesn't specify what happens to the other data > bytes in the same cache line which _weren't_ written -- maybe they'll be > messed up. > > In other words, with "coherent" or "consistent" memory (there is some > technical distinction between the two terms but I don't know what it is)