#include <asm/page.h>
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#ifdef CONFIG_SMP
_GLOBAL(_tlbie)
lwz r8,TASK_CPU(r2)
oris r8,r8,11
mfmsr r10
rlwinm r0,r10,0,17,15
rlwinm r0,r0,0,28,26
mtmsr r0
isync
lis r9,mmu_hash_lock@h
ori r9,r9,mmu_hash_lock@l
tophys(r9,r9)
10: lwarx r7,0,r9
cmpwi 0,r7,0
bne- 10b
stwcx. r8,0,r9
bne- 10b
eieio
tlbie r3
sync
TLBSYNC
li r0,0
stw r0,0(r9)
mtmsr r10
isync
blr
_ASM_NOKPROBE_SYMBOL(_tlbie)
#endif
_GLOBAL(_tlbia)
#if defined(CONFIG_SMP)
lwz r8,TASK_CPU(r2)
oris r8,r8,10
mfmsr r10
rlwinm r0,r10,0,17,15
rlwinm r0,r0,0,28,26
mtmsr r0
isync
lis r9,mmu_hash_lock@h
ori r9,r9,mmu_hash_lock@l
tophys(r9,r9)
10: lwarx r7,0,r9
cmpwi 0,r7,0
bne- 10b
stwcx. r8,0,r9
bne- 10b
#endif
li r5, 32
lis r4, KERNELBASE@h
mtctr r5
sync
0: tlbie r4
addi r4, r4, 0x1000
bdnz 0b
sync
#ifdef CONFIG_SMP
TLBSYNC
li r0,0
stw r0,0(r9)
mtmsr r10
isync
#endif
blr
_ASM_NOKPROBE_SYMBOL(_tlbia)