Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: r3000 cache flush q



David Holland wrote:

> r3k_pdcache_do_inv in cache_r3k_subr.S contains the following per
> cache line:
>
>         sb      zero, 0(a0)
>         sb      zero, 4(a0)
>         sb      zero, 8(a0)
>         sb      zero, 12(a0)
>         sb      zero, 16(a0)
>         sb      zero, 20(a0)
>         sb      zero, 24(a0)
>         addu    a0, 32
>
> that is, it touches each word except the last one.
>
> Can anyone explain this? One would think it would either need exactly
> one word in the cache line to be patted, or all of them, but not all
> but one. (The doc I have suggests that only one is necssary.)

At the end of the loop:

        addu    a0, 32
        bltu    a0, a1, 1b
        sb      zero, -4(a0)		<<<<

the last sb in the branch delay slot touches the last cache line.

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index