]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sparc: Fix handling of orig_i0 wrt. debugging when restarting syscalls.
authorDavid S. Miller <davem@davemloft.net>
Tue, 15 Nov 2011 04:32:16 +0000 (20:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Nov 2011 04:43:07 +0000 (20:43 -0800)
commit1d299bc7732c34d85bd43ac1a8745f5a2fed2078
tree6a39fe975dd6c18ab0e5efda38ac0a5c04c62863
parent9ff03b392fa34f6d549fbb56bf05d8a0483aa818
sparc: Fix handling of orig_i0 wrt. debugging when restarting syscalls.

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: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/signal32.c
arch/sparc/kernel/signal_32.c
arch/sparc/kernel/signal_64.c