1. 14 Dec, 2015 38 commits
  2. 10 Dec, 2015 2 commits
    • Anton Blanchard's avatar
      powerpc: Fix DSCR inheritance over fork() · db1231dc
      Anton Blanchard authored
      Two DSCR tests have a hack in them:
      
      	/*
      	 * XXX: Force a context switch out so that DSCR
      	 * current value is copied into the thread struct
      	 * which is required for the child to inherit the
      	 * changed value.
      	 */
      	sleep(1);
      
      We should not be working around this in the testcase, it is a kernel bug.
      Fix it by copying the current DSCR to the child, instead of what we
      had in the thread struct at last context switch.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      db1231dc
    • 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