1. 14 12月, 2015 38 次提交
  2. 10 12月, 2015 2 次提交
    • A
      powerpc: Fix DSCR inheritance over fork() · db1231dc
      Anton Blanchard 提交于
      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: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      db1231dc
    • A
      powerpc: Call restore_sprs() before _switch() · 20dbe670
      Anton Blanchard 提交于
      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: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      20dbe670