Skip to content

Commit

Permalink
powerpc/32s: Slenderize _tlbia() for powerpc 603/603e
Browse files Browse the repository at this point in the history
_tlbia() is a function used only on 603/603e core, ie on CPUs which
don't have a hash table.

_tlbia() uses the tlbia macro which implements a loop of 1024 tlbie.

On the 603/603e core, flushing the entire TLB requires no more than
32 tlbie.

Replace tlbia by a loop of 32 tlbie.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/12f4f4f0ff89aeab3b937fc96c84fb35e1b2517e.1580748445.git.christophe.leroy@c-s.fr
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Feb 19, 2020
1 parent a83836d commit e1347a0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions arch/powerpc/mm/book3s32/hash_low.S
Original file line number Diff line number Diff line change
Expand Up @@ -696,18 +696,21 @@ _GLOBAL(_tlbia)
bne- 10b
stwcx. r8,0,r9
bne- 10b
#endif /* CONFIG_SMP */
li r5, 32
lis r4, KERNELBASE@h
mtctr r5
sync
tlbia
0: tlbie r4
addi r4, r4, 0x1000
bdnz 0b
sync
#ifdef CONFIG_SMP
TLBSYNC
li r0,0
stw r0,0(r9) /* clear mmu_hash_lock */
mtmsr r10
SYNC_601
isync
#else /* CONFIG_SMP */
sync
tlbia
sync
#endif /* CONFIG_SMP */
blr

0 comments on commit e1347a0

Please sign in to comment.