Why isn't there an validate_dcache_range() function?

Roland Dreier roland at topspin.com
Tue Oct 29 03:25:09 EST 2002


>>>>> "Stephan" == Stephan Linke <Stephan.Linke at epygi.de> writes:

    Stephan> I just got stuck with that question and shurely whoun't
    Stephan> find the answer: If I am using invalidate_dcache_range()
    Stephan> for the data area of an skb shouldn't I enable caching
    Stephan> for that area after the the skb is no longer assigned to
    Stephan> the CPM module? There's no validate_dchace_range() so I
    Stephan> can't.  Why?  There's shurely a reason for that. But I
    Stephan> think using an skb like this will disable caching for
    Stephan> most of the memory areas in a long term view...  Is there
    Stephan> any solution?

invalidate_dcache_range() does not turn off caching for a memory
range.  It just tells the CPU to discard any data for that range that
is currently in the cache.  Future accesses to the range will again
pull data into the CPU cache.  This means that simply using the memory
range again serves the purpose of "validate_dcache_range()" (which as
you note does not actually exist).  However it also means you have to
be careful not to touch the memory range before your external bus
master has finished writing to it (otherwise you could bring invalid
data back into the cache).

Best,
  Roland

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list