lkml.org 
[lkml]   [2004]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: consistent_sync_for_cpu() and friends on ppc32
On Tue, 16 Mar 2004 12:36:07 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> Hrm... I'm still not sure how I'm supposed to implement those
> for non-consistent PPCs (embedded). We don't carry state information
> around, so I suppose I'll have to rely on the direction beeing the
> same for the whole duration of the operation... In which case, it's
> just a matter of having for_cpu nop'ing when direction is TO_DEVICE
> and for_device nop'ing when direction is FROM_DEVICE ? Not clear
> imho...

See, the direction really doesn't matter for the sync ops.

If you flush the cpu caches at MAP time, and your PCI controller doesn't
have DMA caching or something like that, then sync for CPU can always be
a nop. You will have always previously flushed the cpu caches before
giving the buffer back to the device, either via MAP or sync for device
calls.

So basically, make MAP and sync for device writeback flush the cpu caches.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.064 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site