diff options
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/ptrace.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/syscall.h | 28 |
3 files changed, 17 insertions, 17 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 7fc76133b3e4..5caddd4f7bed 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -679,8 +679,6 @@ static inline void pmd_clear(pmd_t *pmd) | |||
679 | 679 | ||
680 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 680 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
681 | { | 681 | { |
682 | if (mm->context.has_pgste) | ||
683 | ptep_rcp_copy(ptep); | ||
684 | pte_val(*ptep) = _PAGE_TYPE_EMPTY; | 682 | pte_val(*ptep) = _PAGE_TYPE_EMPTY; |
685 | if (mm->context.noexec) | 683 | if (mm->context.noexec) |
686 | pte_val(ptep[PTRS_PER_PTE]) = _PAGE_TYPE_EMPTY; | 684 | pte_val(ptep[PTRS_PER_PTE]) = _PAGE_TYPE_EMPTY; |
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index a7226f8143fb..5396f9f12263 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
@@ -321,8 +321,8 @@ struct pt_regs | |||
321 | psw_t psw; | 321 | psw_t psw; |
322 | unsigned long gprs[NUM_GPRS]; | 322 | unsigned long gprs[NUM_GPRS]; |
323 | unsigned long orig_gpr2; | 323 | unsigned long orig_gpr2; |
324 | unsigned short svcnr; | ||
324 | unsigned short ilc; | 325 | unsigned short ilc; |
325 | unsigned short trap; | ||
326 | }; | 326 | }; |
327 | #endif | 327 | #endif |
328 | 328 | ||
@@ -486,8 +486,6 @@ struct task_struct; | |||
486 | extern void user_enable_single_step(struct task_struct *); | 486 | extern void user_enable_single_step(struct task_struct *); |
487 | extern void user_disable_single_step(struct task_struct *); | 487 | extern void user_disable_single_step(struct task_struct *); |
488 | 488 | ||
489 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | ||
490 | |||
491 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) | 489 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) |
492 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) | 490 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) |
493 | #define user_stack_pointer(regs)((regs)->gprs[15]) | 491 | #define user_stack_pointer(regs)((regs)->gprs[15]) |
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index 6e623971fbb9..2429b87eb28d 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h | |||
@@ -17,9 +17,7 @@ | |||
17 | static inline long syscall_get_nr(struct task_struct *task, | 17 | static inline long syscall_get_nr(struct task_struct *task, |
18 | struct pt_regs *regs) | 18 | struct pt_regs *regs) |
19 | { | 19 | { |
20 | if (regs->trap != __LC_SVC_OLD_PSW) | 20 | return regs->svcnr ? regs->svcnr : -1; |
21 | return -1; | ||
22 | return regs->gprs[2]; | ||
23 | } | 21 | } |
24 | 22 | ||
25 | static inline void syscall_rollback(struct task_struct *task, | 23 | static inline void syscall_rollback(struct task_struct *task, |
@@ -52,18 +50,20 @@ static inline void syscall_get_arguments(struct task_struct *task, | |||
52 | unsigned int i, unsigned int n, | 50 | unsigned int i, unsigned int n, |
53 | unsigned long *args) | 51 | unsigned long *args) |
54 | { | 52 | { |
53 | unsigned long mask = -1UL; | ||
54 | |||
55 | BUG_ON(i + n > 6); | 55 | BUG_ON(i + n > 6); |
56 | #ifdef CONFIG_COMPAT | 56 | #ifdef CONFIG_COMPAT |
57 | if (test_tsk_thread_flag(task, TIF_31BIT)) { | 57 | if (test_tsk_thread_flag(task, TIF_31BIT)) |
58 | if (i + n == 6) | 58 | mask = 0xffffffff; |
59 | args[--n] = (u32) regs->args[0]; | ||
60 | while (n-- > 0) | ||
61 | args[n] = (u32) regs->gprs[2 + i + n]; | ||
62 | } | ||
63 | #endif | 59 | #endif |
64 | if (i + n == 6) | 60 | if (i + n == 6) |
65 | args[--n] = regs->args[0]; | 61 | args[--n] = regs->args[0] & mask; |
66 | memcpy(args, ®s->gprs[2 + i], n * sizeof(args[0])); | 62 | while (n-- > 0) |
63 | if (i + n > 0) | ||
64 | args[n] = regs->gprs[2 + i + n] & mask; | ||
65 | if (i == 0) | ||
66 | args[0] = regs->orig_gpr2 & mask; | ||
67 | } | 67 | } |
68 | 68 | ||
69 | static inline void syscall_set_arguments(struct task_struct *task, | 69 | static inline void syscall_set_arguments(struct task_struct *task, |
@@ -74,7 +74,11 @@ static inline void syscall_set_arguments(struct task_struct *task, | |||
74 | BUG_ON(i + n > 6); | 74 | BUG_ON(i + n > 6); |
75 | if (i + n == 6) | 75 | if (i + n == 6) |
76 | regs->args[0] = args[--n]; | 76 | regs->args[0] = args[--n]; |
77 | memcpy(®s->gprs[2 + i], args, n * sizeof(args[0])); | 77 | while (n-- > 0) |
78 | if (i + n > 0) | ||
79 | regs->gprs[2 + i + n] = args[n]; | ||
80 | if (i == 0) | ||
81 | regs->orig_gpr2 = args[0]; | ||
78 | } | 82 | } |
79 | 83 | ||
80 | #endif /* _ASM_SYSCALL_H */ | 84 | #endif /* _ASM_SYSCALL_H */ |