help, trying to invalidate entire icache on 970

Chris Friesen cfriesen at nortel.com
Wed Apr 6 07:15:42 EST 2005


Friesen, Christopher [CAR:VC21:EXCH] wrote:

> Basically, I'm trying to do the brute-force method of flushing it, as 
> described in the 970 manual.  Obviously I'm missing something, but I'm 
> not sure what.  In case it matters, the machine is dual-cpu.
> 
> Anyone have any ideas?  Anyone have any such code that works?

I've switched over to using the en_icbi method of invalidation.  It 
seems to work, but I'm calling icbi once for every cacheline and that 
seems suboptimal.

The manual says that 4 bits of the address are used to index the icache, 
and thus each icbi call with en_icbi enabled will result in 16 
cachelines being invalidated.  Unfortunately I didn't see anywhere where 
it explained which bits they are and how they map to cachelines.  Just 
calling icbi 32 times and incrementing the address by a cacheline each 
time didn't work.

I should be able to get away with only calling it 32 times, assuming I 
pick exactly the right addresses, but I'm at a loss as to which 
addresses to use.

Anyone able to help?

Chris



More information about the Linuxppc64-dev mailing list