[v2] powerpc: Call restore_sprs() before _switch()

Michael Ellerman mpe at ellerman.id.au
Mon Dec 14 20:47:50 AEDT 2015


On Thu, 2015-10-12 at 09:44:39 UTC, Anton Blanchard wrote:
> commit 152d523e6307 ("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().
> 
> Signed-off-by: Anton Blanchard <anton at samba.org>
> Fixes: 152d523e6307 ("powerpc: Create context switch helpers save_sprs() and restore_sprs()")

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/20dbe67062062c2a790832f0

cheers


More information about the Linuxppc-dev mailing list