openrisc: Rework signal handling
authorJonas Bonn <jonas@southpole.se>
Sun, 19 Feb 2012 16:36:53 +0000 (17:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:03:59 +0000 (09:03 -0700)
commitaf7b15c9d60584ad34b2ac1641953229ac6d1ba8
tree523ab1ed0f5c1bbfa17d06df6c692ec4ed06d787
parent4f91cb537d2f7fa700a2b6d86a2cc77d20ee2616
openrisc: Rework signal handling

commit 10f67dbf6add97751050f294d4c8e0cc1e5c2c23 upstream.

The mainline signal handling code for OpenRISC has been buggy since day
one with respect to syscall restart.  This patch significantly reworks
the signal handling code:

i)   Move the "work pending" loop to C code (borrowed from ARM arch)

ii)  Allow a tracer to muck about with the IP and skip syscall restart
     in that case (again, borrowed from ARM)

iii) Make signal handling WRT syscall restart actually work

v)   Make the signal handling code look more like that of other
     architectures so that it's easier for others to follow

Reported-by: Anders Nystrom <anders@southpole.se>
Signed-off-by: Jonas Bonn <jonas@southpole.se>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/openrisc/kernel/entry.S
arch/openrisc/kernel/signal.c