[Top] [All Lists]

Re: __flush_cache_all() miscellany

To: "Maciej W. Rozycki" <>
Subject: Re: __flush_cache_all() miscellany
From: "Justin Carlson" <>
Date: 29 May 2002 13:20:46 -0700
In-reply-to: <>
References: <>
On Wed, 2002-05-29 at 12:50, Maciej W. Rozycki wrote:
> On 29 May 2002, Justin Carlson wrote:
> > Here's a patch against cvs that does the rename.  Unless anyone has
> > objections, Ralf, could  you apply this?
>  That looks fine to me.  I'd keep the leading double underscore, though --
> it acts as a warning sign the function is internal and low-level and thus
> it should not be used without an appropriate justification.

Yes, you're right, it's not a standard function to have.  But I'm
already wondering if this is not the right thing to do.  See below.

>  Well, at least r3k uses WT for dcache, so it really doesn't matter unless
> what you want to achieve is to hit performance.  I suspect this is also
> the case for the others that ignore dcache flushes.  The L1 vs L2 issue
> should be investigated where applicable. 

Are the general semantics of the thing just broken, then?  We already
ignore the arguments to sys_cacheflush; would redefining the syscall to
mean "flush the caches in such a way that I won't get stale instructions
from this address range" actually break any current programs? 
(Evidently not, if several ports are already doing it that way)...

More to the point, does __flush_cache_all() serve any useful purpose at
all, or can it just be replaced with appropriate invocations of
flush_icache_range()?   Other than internal use for the individual port
cache routines, it's *only* used in the syscalls and the gdb stub. 

I'd like to hear the rationale for __flush_cache_all() from the original
author; it appears to have shown up in CVS a little more than a year
ago, but I don't know who sent the patch to Ralf.  Ralf, do you


<Prev in Thread] Current Thread [Next in Thread>