• Anton Blanchard's avatar
    powerpc: Call restore_sprs() before _switch() · 20dbe670
    Anton Blanchard authored
    commit 152d523e ("powerpc: Create context switch helpers save_sprs()
    and restore_sprs()") moved the restore of SPRs after the call to _switch().
    
    There is an issue with this approach - new tasks do not return through
    _switch(), they are set up by copy_thread() to directly return through
    ret_from_fork() or ret_from_kernel_thread(). This means restore_sprs() is
    not getting called for new tasks.
    
    Fix this by moving restore_sprs() before _switch().
    
    Fixes: 152d523e ("powerpc: Create context switch helpers save_sprs() and restore_sprs()")
    Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    20dbe670
process.c 43.7 KB