li r9,0
_GLOBAL(htab_call_hpte_insert1)
bl . /* Will be patched by htab_finish_init() */
- cmpi 0,r3,0
+ cmpdi 0,r3,0
bge htab_pte_insert_ok /* Insertion successful */
- cmpi 0,r3,-2 /* Critical failure */
+ cmpdi 0,r3,-2 /* Critical failure */
beq- htab_pte_insert_failure
/* Now try secondary slot */
li r9,0
_GLOBAL(htab_call_hpte_insert2)
bl . /* Will be patched by htab_finish_init() */
- cmpi 0,r3,0
+ cmpdi 0,r3,0
bge+ htab_pte_insert_ok /* Insertion successful */
- cmpi 0,r3,-2 /* Critical failure */
+ cmpdi 0,r3,-2 /* Critical failure */
beq- htab_pte_insert_failure
/* Both are full, we need to evict something */
/* if we failed because typically the HPTE wasn't really here
* we try an insertion.
*/
- cmpi 0,r3,-1
+ cmpdi 0,r3,-1
beq- htab_insert_pte
/* Clear the BUSY bit and Write out the PTE */
b bail
htab_pte_insert_failure:
- b .htab_insert_failure
+ /* Bail out restoring old PTE */
+ ld r6,STK_PARM(r6)(r1)
+ std r31,0(r6)
+ li r3,-1
+ b bail