diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-30 14:07:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-30 14:07:16 -0500 |
commit | f1ba3bc7b97ad0cc5886e5dadf4defba68f37819 (patch) | |
tree | 733ec0fb6ab2f15732eb96b1fdd0e027ee3d4b92 /arch/s390/include | |
parent | 95c5e1f1e6e1788cc8b9acbe9379ae395ef64958 (diff) | |
parent | abd942194dcba2fa9d24d547b8acd4ef052eaf73 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] Update default configuration.
[S390] Fix alignment of initial kernel stack.
[S390] pgtable.h: Fix oops in unmap_vmas for KVM processes
[S390] fix/cleanup sched_clock
[S390] fix system call parameter functions.
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/syscall.h | 28 |
3 files changed, 17 insertions, 15 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 560ce8561dfd..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 | ||
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 */ |