diff options
Diffstat (limited to 'arch/openrisc/include')
-rw-r--r-- | arch/openrisc/include/asm/ptrace.h | 6 | ||||
-rw-r--r-- | arch/openrisc/include/asm/syscall.h | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h index e612ce4512c7..4651a737591d 100644 --- a/arch/openrisc/include/asm/ptrace.h +++ b/arch/openrisc/include/asm/ptrace.h | |||
@@ -73,9 +73,13 @@ struct pt_regs { | |||
73 | }; | 73 | }; |
74 | }; | 74 | }; |
75 | long pc; | 75 | long pc; |
76 | /* For restarting system calls: | ||
77 | * Set to syscall number for syscall exceptions, | ||
78 | * -1 for all other exceptions. | ||
79 | */ | ||
76 | long orig_gpr11; /* For restarting system calls */ | 80 | long orig_gpr11; /* For restarting system calls */ |
77 | long syscallno; /* Syscall number (used by strace) */ | ||
78 | long dummy; /* Cheap alignment fix */ | 81 | long dummy; /* Cheap alignment fix */ |
82 | long dummy2; /* Cheap alignment fix */ | ||
79 | }; | 83 | }; |
80 | 84 | ||
81 | /* TODO: Rename this to REDZONE because that's what it is */ | 85 | /* TODO: Rename this to REDZONE because that's what it is */ |
diff --git a/arch/openrisc/include/asm/syscall.h b/arch/openrisc/include/asm/syscall.h index 9f0337055d26..b752bb67891d 100644 --- a/arch/openrisc/include/asm/syscall.h +++ b/arch/openrisc/include/asm/syscall.h | |||
@@ -25,7 +25,7 @@ | |||
25 | static inline int | 25 | static inline int |
26 | syscall_get_nr(struct task_struct *task, struct pt_regs *regs) | 26 | syscall_get_nr(struct task_struct *task, struct pt_regs *regs) |
27 | { | 27 | { |
28 | return regs->syscallno ? regs->syscallno : -1; | 28 | return regs->orig_gpr11; |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline void | 31 | static inline void |
@@ -50,10 +50,7 @@ static inline void | |||
50 | syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, | 50 | syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, |
51 | int error, long val) | 51 | int error, long val) |
52 | { | 52 | { |
53 | if (error) | 53 | regs->gpr[11] = (long) error ?: val; |
54 | regs->gpr[11] = -error; | ||
55 | else | ||
56 | regs->gpr[11] = val; | ||
57 | } | 54 | } |
58 | 55 | ||
59 | static inline void | 56 | static inline void |