openrisc: sanitize use of orig_gpr11

The pt_regs struct had both a 'syscallno' field and an 'orig_gpr11' field
and it wasn't really clear how these were supposed to be used.  This patch
removes the syscallno field altogether and makes orig_gpr11 work more
like other architectures: keep track of syscall number in progress or
hold -1 for non-syscall exceptions.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
This commit is contained in:
Jonas Bonn
2012-03-02 10:05:24 +01:00
parent 2f099a280e
commit 6cbe5e9526
6 changed files with 22 additions and 21 deletions

View File

@@ -305,7 +305,7 @@ void do_signal(struct pt_regs *regs)
* below mean that the syscall executed to completion and no
* restart is necessary.
*/
if (regs->syscallno) {
if (regs->orig_gpr11) {
int restart = 0;
switch (regs->gpr[11]) {