[RFC] powerpc: Merge 32/64 cacheflush code

Mark A. Greer mgreer at mvista.com
Wed Dec 21 10:31:36 EST 2005


On Wed, Dec 21, 2005 at 10:21:54AM +1100, David Gibson wrote:
> On Tue, Dec 20, 2005 at 11:27:49AM -0700, Mark A. Greer wrote:
> > On Tue, Dec 20, 2005 at 12:06:17PM +1100, David Gibson wrote:
> > <snip>
> > > Previously, the ppc32 version of flush_dcache_range() did a writeback
> > > and invalidate of the given cache lines (dcbf) whereas the ppc64
> > > version did just a writeback (dcbst).  In general, there's no
> > > consistent meaning of "flush" as one or the other, so this patch also
> > > renames the dcache flushing functions less ambiguously.  The new names
> > > are:
> > > 
> > > 	wback_dcache_range() - previously flush_dcache_range() on
> > > ppc64 and clean_dcache_range() on ppc32
> > > 
> > > 	wback_inval_dcache_range() - previously
> > > flush_inval_dcache_range() on ppc64 and flush_dcache_range on ppc32
> > 
> > I agree about the inconsistent meaning of 'flush' but I find 'wback'
> > distracting b/c it also refers to a type of cache/cache mode.
> > It makes me think that there's another set of routines for writethru or
> > something like that.  I realize the caches are in writeback mode but the
> > point is that it sends my brain down a different path than what is really
> > meant.
> 
> I see what you mean, but I can't think of a better term.

Me either. :(

> We could use
> "clean", but I don't like that very much either.

I can't either, really.  The only ones that come to mind are "push" or
"write"...write_inval_dcache_range()?  Not sure if that's better or
worse.

> > Could we just define 'flush' to mean "push the cached data/instns back
> > into memory but not invalidate" and still call them 'flush'?  Or use
> > 'push' or something else that does also refer to a cache mode?
> 
> I don't think there's any way to make such a definition obvious enough
> that someone won't make the same mistake at some later point.

I agree.  Its not a big deal.  I figured I'd says something before it
was too late and maybe someone would come up w/ a better term.

Mark



More information about the Linuxppc64-dev mailing list