• Christophe Leroy's avatar
    powerpc/40x: Don't use SPRN_SPRG_SCRATCH2 in EXCEPTION_PROLOG · 57bc13ac
    Christophe Leroy authored
    Unlike said in the comment, r1 is not reused by the critical
    exception handler, as it uses a dedicated critirq_ctx stack.
    Decrementing r1 early is then unneeded.
    
    Should the above be valid, the code is crap buggy anyway as
    r1 gets some intermediate values that would jeopardise the
    whole process (for instance after mfspr   r1,SPRN_SPRG_THREAD)
    
    Using SPRN_SPRG_SCRATCH2 to save r1 is then not needed, r11 can be
    used instead. This avoids one mtspr and one mfspr and makes the
    prolog closer to what's done on 6xx and 8xx.
    Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    57bc13ac
head_40x.S 27.6 KB