1. 16 11月, 2011 1 次提交
    • D
      sparc: Stash orig_i0 into %g6 instead of %g2 · e88d2468
      David S. Miller 提交于
      As per the comments added by this commit, %g2 turns out to not be a
      usable place to save away orig_i0 for syscall restart handling.
      
      In fact all of %g2, %g3, %g4, and %g5 are assumed to be saved across
      a system call by various bits of code in glibc.
      
      %g1 can't be used because that holds the syscall number, which would
      need to be saved and restored for syscall restart handling too, and
      that would only compound our problems :-)
      
      This leaves us with %g6 and %g7 which are for "system use".  %g7 is
      used as the "thread register" by glibc, but %g6 is used as a compiler
      and assembler temporary scratch register.  And in no instance is %g6
      used to hold a value across a system call.
      
      Therefore %g6 is safe for storing away orig_i0, at least for now.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e88d2468
  2. 15 11月, 2011 1 次提交
    • D
      sparc: Fix handling of orig_i0 wrt. debugging when restarting syscalls. · 1d299bc7
      David S. Miller 提交于
      Although we provide a proper way for a debugger to control whether
      syscall restart occurs, we run into problems because orig_i0 is not
      saved and restored properly.
      
      Luckily we can solve this problem without having to make debuggers
      aware of the issue.  Across system calls, several registers are
      considered volatile and can be safely clobbered.
      
      Therefore we use the pt_regs save area of one of those registers, %g2,
      as a place to save and restore orig_i0.
      
      Debuggers transparently will do the right thing because they save and
      restore this register already.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d299bc7
  3. 14 11月, 2011 2 次提交
  4. 13 11月, 2011 2 次提交
  5. 12 11月, 2011 17 次提交
  6. 11 11月, 2011 17 次提交