Subject: Re: StrongARM performance tweaks cpufunc_asm.S
To: Neil A. Carson <neil@causality.com>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 03/08/2001 11:15:35
> Richard Earnshaw wrote:
> 
> > Finally the correctness fix is to add some calls to drain the write
> buffers
> > -- these are particularly important when we are trying to
> synchronize I$
> > and D$.
> 
> This is just from my poor old memory, and it comes with a 100%
> could-well-be-bollocks but:
> 
> I think I recall ripping these out. The write buffer is a physically
> tagged object next to memory, so it only needs to be flushed when
> synchronising main memory for DMA, *not* when cache
> flushing/synchronising. Please check this...

I could be just being paranoid, but I couldn't find anything in the SA TRM 
to indicate whether or not the I$ block on, or could snoop the write 
buffer.  I seem to recall that this was the thing that fixed Xconsole 
dying when my X server started up; I'll investigate further.

> 
> Also I think there was a reason why the author used two hunks of RAM
> to
> flush the cache but I can't remember what it was; it seemed the
> popular
> thing at the time.

Well the SA TRM definitely says that two banks aren't necessary iff the 
memory is unused for any other purpose.  (maybe this was a hack to work 
around not draining the write buffers properly :-)  I've been using this 
code for ~6 months in my own kernel and not seen any ill effects from it.

I'll do some more checks.