diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2011-11-03 23:32:20 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2011-11-03 23:32:20 -0400 |
| commit | 3983138c017b6aeab6ce3dbb1e9afbe80bdac496 (patch) | |
| tree | 9fdcddfdb8ada91504c90e2551ba6a565ade7325 /arch/s390/include/asm/syscall.h | |
| parent | ed5f886d16369fed5a69d96b8e85777c47206de1 (diff) | |
| parent | 02aac316abf436a7529d46a71f7083f9f9ef4b49 (diff) | |
Merge branch 'for-grant' of git://sources.calxeda.com/kernel/linux into devicetree/merge
Diffstat (limited to 'arch/s390/include/asm/syscall.h')
| -rw-r--r-- | arch/s390/include/asm/syscall.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index 5c0246b955d8..b239ff53b189 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h @@ -13,6 +13,7 @@ #define _ASM_SYSCALL_H 1 #include <linux/sched.h> +#include <linux/err.h> #include <asm/ptrace.h> /* @@ -25,7 +26,8 @@ extern const unsigned int sys_call_table[]; static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { - return regs->svcnr ? regs->svcnr : -1; + return test_tsk_thread_flag(task, TIF_SYSCALL) ? + (regs->svc_code & 0xffff) : -1; } static inline void syscall_rollback(struct task_struct *task, @@ -37,7 +39,7 @@ static inline void syscall_rollback(struct task_struct *task, static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { - return (regs->gprs[2] >= -4096UL) ? -regs->gprs[2] : 0; + return IS_ERR_VALUE(regs->gprs[2]) ? regs->gprs[2] : 0; } static inline long syscall_get_return_value(struct task_struct *task, |
