[PATCH] Handle I-TLB Error and Miss separately on 8xx

Joakim Tjernlund joakim.tjernlund at lumentis.se
Wed Jan 12 18:53:17 EST 2005

> As the code stands currently, there is a bug in the 2.4 and 2.6 handling
> of I-TLB Miss and Error exceptions on 8xx.  The problem is that since we
> treat both of them as the same exception when we hit do_page_fault,
> there is a case where we can incorrectly find that a protection fault
> has occured, when it hasn't.  This is because we check bit 4 of SRR1 in
> both cases, but in the case of an I-TLB Miss, this bit is always set,
> and it only indicates a protection fault on an I-TLB Error.

Patch looks good to me, but I want to ask when this error
can be triggered in practice?

I have never seen it happen and it makes me wonder if the test
for a null pte in the I-TLB Miss handler is needed?

In linuxppc-2.4 there is a special case for pinned tlbs were
one could remove 4 instructions if the test for null ptes is removed.

I belive SPRG2 is free in 2.6 and if combined with the special case for pinned
tlbs in linuxppc-2.4 one can remove all memory references used for temporary
storage in the I-TLB Miss handler. That will save a cache line load&store.


More information about the Linuxppc-embedded mailing list