All of lore.kernel.org
 help / color / mirror / Atom feed
* Why isn't there an validate_dcache_range() function?
@ 2002-10-28 15:38 Stephan Linke
  2002-10-28 16:25 ` Roland Dreier
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Linke @ 2002-10-28 15:38 UTC (permalink / raw)
  To: Linuxppc-Embedded


Hi,

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

Stephan


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why isn't there an validate_dcache_range() function?
  2002-10-28 15:38 Why isn't there an validate_dcache_range() function? Stephan Linke
@ 2002-10-28 16:25 ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2002-10-28 16:25 UTC (permalink / raw)
  To: Stephan Linke; +Cc: Linuxppc-Embedded


>>>>> "Stephan" == Stephan Linke <Stephan.Linke@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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-28 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-28 15:38 Why isn't there an validate_dcache_range() function? Stephan Linke
2002-10-28 16:25 ` Roland Dreier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.