diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:35:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:37:32 -0400 |
commit | 365d46dc9be9b3c833990a06f3994b1987eda578 (patch) | |
tree | 9397d1304144a288411f2118707f44ff5e862fa6 /arch/s390/include | |
parent | 5dc64a3442b98eaa0e3730c35fcf00cf962a93e7 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/xen
Conflicts:
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process_64.c
arch/x86/xen/enlighten.c
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/dasd.h | 13 | ||||
-rw-r--r-- | arch/s390/include/asm/delay.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 45 | ||||
-rw-r--r-- | arch/s390/include/asm/ptrace.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/qdio.h | 8 | ||||
-rw-r--r-- | arch/s390/include/asm/syscall.h | 80 | ||||
-rw-r--r-- | arch/s390/include/asm/thread_info.h | 2 |
7 files changed, 147 insertions, 3 deletions
diff --git a/arch/s390/include/asm/dasd.h b/arch/s390/include/asm/dasd.h index 3f002e13d024..55b2b80cdf6e 100644 --- a/arch/s390/include/asm/dasd.h +++ b/arch/s390/include/asm/dasd.h | |||
@@ -3,6 +3,8 @@ | |||
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Bugreports.to..: <Linux390@de.ibm.com> | 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
5 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 | 5 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 |
6 | * EMC Symmetrix ioctl Copyright EMC Corporation, 2008 | ||
7 | * Author.........: Nigel Hislop <hislop_nigel@emc.com> | ||
6 | * | 8 | * |
7 | * This file is the interface of the DASD device driver, which is exported to user space | 9 | * This file is the interface of the DASD device driver, which is exported to user space |
8 | * any future changes wrt the API will result in a change of the APIVERSION reported | 10 | * any future changes wrt the API will result in a change of the APIVERSION reported |
@@ -202,6 +204,16 @@ typedef struct attrib_data_t { | |||
202 | #define DASD_SEQ_PRESTAGE 0x4 | 204 | #define DASD_SEQ_PRESTAGE 0x4 |
203 | #define DASD_REC_ACCESS 0x5 | 205 | #define DASD_REC_ACCESS 0x5 |
204 | 206 | ||
207 | /* | ||
208 | * Perform EMC Symmetrix I/O | ||
209 | */ | ||
210 | typedef struct dasd_symmio_parms { | ||
211 | unsigned char reserved[8]; /* compat with older releases */ | ||
212 | unsigned long long psf_data; /* char * cast to u64 */ | ||
213 | unsigned long long rssd_result; /* char * cast to u64 */ | ||
214 | int psf_data_len; | ||
215 | int rssd_result_len; | ||
216 | } __attribute__ ((packed)) dasd_symmio_parms_t; | ||
205 | 217 | ||
206 | /******************************************************************************** | 218 | /******************************************************************************** |
207 | * SECTION: Definition of IOCTLs | 219 | * SECTION: Definition of IOCTLs |
@@ -247,6 +259,7 @@ typedef struct attrib_data_t { | |||
247 | /* Set Attributes (cache operations) */ | 259 | /* Set Attributes (cache operations) */ |
248 | #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) | 260 | #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) |
249 | 261 | ||
262 | #define BIODASDSYMMIO _IOWR(DASD_IOCTL_LETTER, 240, dasd_symmio_parms_t) | ||
250 | 263 | ||
251 | #endif /* DASD_H */ | 264 | #endif /* DASD_H */ |
252 | 265 | ||
diff --git a/arch/s390/include/asm/delay.h b/arch/s390/include/asm/delay.h index 78357314c450..a356c958e260 100644 --- a/arch/s390/include/asm/delay.h +++ b/arch/s390/include/asm/delay.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define _S390_DELAY_H | 15 | #define _S390_DELAY_H |
16 | 16 | ||
17 | extern void __udelay(unsigned long usecs); | 17 | extern void __udelay(unsigned long usecs); |
18 | extern void udelay_simple(unsigned long usecs); | ||
18 | extern void __delay(unsigned long loops); | 19 | extern void __delay(unsigned long loops); |
19 | 20 | ||
20 | #define udelay(n) __udelay(n) | 21 | #define udelay(n) __udelay(n) |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 0bdb704ae051..1a928f84afd6 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -281,6 +281,9 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
281 | #define RCP_GR_BIT 50 | 281 | #define RCP_GR_BIT 50 |
282 | #define RCP_GC_BIT 49 | 282 | #define RCP_GC_BIT 49 |
283 | 283 | ||
284 | /* User dirty bit for KVM's migration feature */ | ||
285 | #define KVM_UD_BIT 47 | ||
286 | |||
284 | #ifndef __s390x__ | 287 | #ifndef __s390x__ |
285 | 288 | ||
286 | /* Bits in the segment table address-space-control-element */ | 289 | /* Bits in the segment table address-space-control-element */ |
@@ -575,12 +578,16 @@ static inline void ptep_rcp_copy(pte_t *ptep) | |||
575 | unsigned long *pgste = (unsigned long *) (ptep + PTRS_PER_PTE); | 578 | unsigned long *pgste = (unsigned long *) (ptep + PTRS_PER_PTE); |
576 | 579 | ||
577 | skey = page_get_storage_key(page_to_phys(page)); | 580 | skey = page_get_storage_key(page_to_phys(page)); |
578 | if (skey & _PAGE_CHANGED) | 581 | if (skey & _PAGE_CHANGED) { |
579 | set_bit_simple(RCP_GC_BIT, pgste); | 582 | set_bit_simple(RCP_GC_BIT, pgste); |
583 | set_bit_simple(KVM_UD_BIT, pgste); | ||
584 | } | ||
580 | if (skey & _PAGE_REFERENCED) | 585 | if (skey & _PAGE_REFERENCED) |
581 | set_bit_simple(RCP_GR_BIT, pgste); | 586 | set_bit_simple(RCP_GR_BIT, pgste); |
582 | if (test_and_clear_bit_simple(RCP_HC_BIT, pgste)) | 587 | if (test_and_clear_bit_simple(RCP_HC_BIT, pgste)) { |
583 | SetPageDirty(page); | 588 | SetPageDirty(page); |
589 | set_bit_simple(KVM_UD_BIT, pgste); | ||
590 | } | ||
584 | if (test_and_clear_bit_simple(RCP_HR_BIT, pgste)) | 591 | if (test_and_clear_bit_simple(RCP_HR_BIT, pgste)) |
585 | SetPageReferenced(page); | 592 | SetPageReferenced(page); |
586 | #endif | 593 | #endif |
@@ -744,6 +751,40 @@ static inline pte_t pte_mkspecial(pte_t pte) | |||
744 | return pte; | 751 | return pte; |
745 | } | 752 | } |
746 | 753 | ||
754 | #ifdef CONFIG_PGSTE | ||
755 | /* | ||
756 | * Get (and clear) the user dirty bit for a PTE. | ||
757 | */ | ||
758 | static inline int kvm_s390_test_and_clear_page_dirty(struct mm_struct *mm, | ||
759 | pte_t *ptep) | ||
760 | { | ||
761 | int dirty; | ||
762 | unsigned long *pgste; | ||
763 | struct page *page; | ||
764 | unsigned int skey; | ||
765 | |||
766 | if (!mm->context.pgstes) | ||
767 | return -EINVAL; | ||
768 | rcp_lock(ptep); | ||
769 | pgste = (unsigned long *) (ptep + PTRS_PER_PTE); | ||
770 | page = virt_to_page(pte_val(*ptep)); | ||
771 | skey = page_get_storage_key(page_to_phys(page)); | ||
772 | if (skey & _PAGE_CHANGED) { | ||
773 | set_bit_simple(RCP_GC_BIT, pgste); | ||
774 | set_bit_simple(KVM_UD_BIT, pgste); | ||
775 | } | ||
776 | if (test_and_clear_bit_simple(RCP_HC_BIT, pgste)) { | ||
777 | SetPageDirty(page); | ||
778 | set_bit_simple(KVM_UD_BIT, pgste); | ||
779 | } | ||
780 | dirty = test_and_clear_bit_simple(KVM_UD_BIT, pgste); | ||
781 | if (skey & _PAGE_CHANGED) | ||
782 | page_clear_dirty(page); | ||
783 | rcp_unlock(ptep); | ||
784 | return dirty; | ||
785 | } | ||
786 | #endif | ||
787 | |||
747 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 788 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
748 | static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, | 789 | static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, |
749 | unsigned long addr, pte_t *ptep) | 790 | unsigned long addr, pte_t *ptep) |
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index af2c9ac28a07..a7226f8143fb 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
@@ -490,6 +490,7 @@ extern void user_disable_single_step(struct task_struct *); | |||
490 | 490 | ||
491 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) | 491 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) |
492 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) | 492 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) |
493 | #define user_stack_pointer(regs)((regs)->gprs[15]) | ||
493 | #define regs_return_value(regs)((regs)->gprs[2]) | 494 | #define regs_return_value(regs)((regs)->gprs[2]) |
494 | #define profile_pc(regs) instruction_pointer(regs) | 495 | #define profile_pc(regs) instruction_pointer(regs) |
495 | extern void show_regs(struct pt_regs * regs); | 496 | extern void show_regs(struct pt_regs * regs); |
diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h index 6813772171f2..4734c3f05354 100644 --- a/arch/s390/include/asm/qdio.h +++ b/arch/s390/include/asm/qdio.h | |||
@@ -299,7 +299,13 @@ struct qdio_ssqd_desc { | |||
299 | u8 mbccnt; | 299 | u8 mbccnt; |
300 | u16 qdioac2; | 300 | u16 qdioac2; |
301 | u64 sch_token; | 301 | u64 sch_token; |
302 | u64:64; | 302 | u8 mro; |
303 | u8 mri; | ||
304 | u8:8; | ||
305 | u8 sbalic; | ||
306 | u16:16; | ||
307 | u8:8; | ||
308 | u8 mmwc; | ||
303 | } __attribute__ ((packed)); | 309 | } __attribute__ ((packed)); |
304 | 310 | ||
305 | /* params are: ccw_device, qdio_error, queue_number, | 311 | /* params are: ccw_device, qdio_error, queue_number, |
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h new file mode 100644 index 000000000000..6e623971fbb9 --- /dev/null +++ b/arch/s390/include/asm/syscall.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * Access to user system call parameters and results | ||
3 | * | ||
4 | * Copyright IBM Corp. 2008 | ||
5 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License (version 2 only) | ||
9 | * as published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_SYSCALL_H | ||
13 | #define _ASM_SYSCALL_H 1 | ||
14 | |||
15 | #include <asm/ptrace.h> | ||
16 | |||
17 | static inline long syscall_get_nr(struct task_struct *task, | ||
18 | struct pt_regs *regs) | ||
19 | { | ||
20 | if (regs->trap != __LC_SVC_OLD_PSW) | ||
21 | return -1; | ||
22 | return regs->gprs[2]; | ||
23 | } | ||
24 | |||
25 | static inline void syscall_rollback(struct task_struct *task, | ||
26 | struct pt_regs *regs) | ||
27 | { | ||
28 | regs->gprs[2] = regs->orig_gpr2; | ||
29 | } | ||
30 | |||
31 | static inline long syscall_get_error(struct task_struct *task, | ||
32 | struct pt_regs *regs) | ||
33 | { | ||
34 | return (regs->gprs[2] >= -4096UL) ? -regs->gprs[2] : 0; | ||
35 | } | ||
36 | |||
37 | static inline long syscall_get_return_value(struct task_struct *task, | ||
38 | struct pt_regs *regs) | ||
39 | { | ||
40 | return regs->gprs[2]; | ||
41 | } | ||
42 | |||
43 | static inline void syscall_set_return_value(struct task_struct *task, | ||
44 | struct pt_regs *regs, | ||
45 | int error, long val) | ||
46 | { | ||
47 | regs->gprs[2] = error ? -error : val; | ||
48 | } | ||
49 | |||
50 | static inline void syscall_get_arguments(struct task_struct *task, | ||
51 | struct pt_regs *regs, | ||
52 | unsigned int i, unsigned int n, | ||
53 | unsigned long *args) | ||
54 | { | ||
55 | BUG_ON(i + n > 6); | ||
56 | #ifdef CONFIG_COMPAT | ||
57 | if (test_tsk_thread_flag(task, TIF_31BIT)) { | ||
58 | if (i + n == 6) | ||
59 | args[--n] = (u32) regs->args[0]; | ||
60 | while (n-- > 0) | ||
61 | args[n] = (u32) regs->gprs[2 + i + n]; | ||
62 | } | ||
63 | #endif | ||
64 | if (i + n == 6) | ||
65 | args[--n] = regs->args[0]; | ||
66 | memcpy(args, ®s->gprs[2 + i], n * sizeof(args[0])); | ||
67 | } | ||
68 | |||
69 | static inline void syscall_set_arguments(struct task_struct *task, | ||
70 | struct pt_regs *regs, | ||
71 | unsigned int i, unsigned int n, | ||
72 | const unsigned long *args) | ||
73 | { | ||
74 | BUG_ON(i + n > 6); | ||
75 | if (i + n == 6) | ||
76 | regs->args[0] = args[--n]; | ||
77 | memcpy(®s->gprs[2 + i], args, n * sizeof(args[0])); | ||
78 | } | ||
79 | |||
80 | #endif /* _ASM_SYSCALL_H */ | ||
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 91a8f93ad355..ea40a9d690fc 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -86,6 +86,7 @@ static inline struct thread_info *current_thread_info(void) | |||
86 | * thread information flags bit numbers | 86 | * thread information flags bit numbers |
87 | */ | 87 | */ |
88 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 88 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
89 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ | ||
89 | #define TIF_SIGPENDING 2 /* signal pending */ | 90 | #define TIF_SIGPENDING 2 /* signal pending */ |
90 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 91 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
91 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ | 92 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ |
@@ -100,6 +101,7 @@ static inline struct thread_info *current_thread_info(void) | |||
100 | #define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */ | 101 | #define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */ |
101 | 102 | ||
102 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 103 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
104 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
103 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 105 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
104 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 106 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
105 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 107 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |