diff options
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/atomic.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/bitsperlong.h | 13 | ||||
-rw-r--r-- | arch/s390/include/asm/compat.h | 19 | ||||
-rw-r--r-- | arch/s390/include/asm/cpu.h | 32 | ||||
-rw-r--r-- | arch/s390/include/asm/cputime.h | 19 | ||||
-rw-r--r-- | arch/s390/include/asm/ftrace.h | 21 | ||||
-rw-r--r-- | arch/s390/include/asm/lowcore.h | 9 | ||||
-rw-r--r-- | arch/s390/include/asm/mman.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 7 | ||||
-rw-r--r-- | arch/s390/include/asm/seccomp.h | 16 | ||||
-rw-r--r-- | arch/s390/include/asm/signal.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/spinlock.h | 19 | ||||
-rw-r--r-- | arch/s390/include/asm/suspend.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/syscall.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/termios.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/thread_info.h | 12 | ||||
-rw-r--r-- | arch/s390/include/asm/types.h | 6 | ||||
-rw-r--r-- | arch/s390/include/asm/uaccess.h | 16 | ||||
-rw-r--r-- | arch/s390/include/asm/unistd.h | 4 |
20 files changed, 140 insertions, 69 deletions
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h index de432f2de2d2..fca9dffcc669 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
@@ -275,6 +275,6 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, | |||
275 | #define smp_mb__before_atomic_inc() smp_mb() | 275 | #define smp_mb__before_atomic_inc() smp_mb() |
276 | #define smp_mb__after_atomic_inc() smp_mb() | 276 | #define smp_mb__after_atomic_inc() smp_mb() |
277 | 277 | ||
278 | #include <asm-generic/atomic.h> | 278 | #include <asm-generic/atomic-long.h> |
279 | #endif /* __KERNEL__ */ | 279 | #endif /* __KERNEL__ */ |
280 | #endif /* __ARCH_S390_ATOMIC__ */ | 280 | #endif /* __ARCH_S390_ATOMIC__ */ |
diff --git a/arch/s390/include/asm/bitsperlong.h b/arch/s390/include/asm/bitsperlong.h new file mode 100644 index 000000000000..6b235aea9c66 --- /dev/null +++ b/arch/s390/include/asm/bitsperlong.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __ASM_S390_BITSPERLONG_H | ||
2 | #define __ASM_S390_BITSPERLONG_H | ||
3 | |||
4 | #ifndef __s390x__ | ||
5 | #define __BITS_PER_LONG 32 | ||
6 | #else | ||
7 | #define __BITS_PER_LONG 64 | ||
8 | #endif | ||
9 | |||
10 | #include <asm-generic/bitsperlong.h> | ||
11 | |||
12 | #endif /* __ASM_S390_BITSPERLONG_H */ | ||
13 | |||
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index de065b32381a..01a08020bc0e 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/thread_info.h> | ||
8 | 9 | ||
9 | #define PSW32_MASK_PER 0x40000000UL | 10 | #define PSW32_MASK_PER 0x40000000UL |
10 | #define PSW32_MASK_DAT 0x04000000UL | 11 | #define PSW32_MASK_DAT 0x04000000UL |
@@ -163,12 +164,28 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr) | |||
163 | return (u32)(unsigned long)uptr; | 164 | return (u32)(unsigned long)uptr; |
164 | } | 165 | } |
165 | 166 | ||
167 | #ifdef CONFIG_COMPAT | ||
168 | |||
169 | static inline int is_compat_task(void) | ||
170 | { | ||
171 | return test_thread_flag(TIF_31BIT); | ||
172 | } | ||
173 | |||
174 | #else | ||
175 | |||
176 | static inline int is_compat_task(void) | ||
177 | { | ||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | #endif | ||
182 | |||
166 | static inline void __user *compat_alloc_user_space(long len) | 183 | static inline void __user *compat_alloc_user_space(long len) |
167 | { | 184 | { |
168 | unsigned long stack; | 185 | unsigned long stack; |
169 | 186 | ||
170 | stack = KSTK_ESP(current); | 187 | stack = KSTK_ESP(current); |
171 | if (test_thread_flag(TIF_31BIT)) | 188 | if (is_compat_task()) |
172 | stack &= 0x7fffffffUL; | 189 | stack &= 0x7fffffffUL; |
173 | return (void __user *) (stack - len); | 190 | return (void __user *) (stack - len); |
174 | } | 191 | } |
diff --git a/arch/s390/include/asm/cpu.h b/arch/s390/include/asm/cpu.h deleted file mode 100644 index d60a2eefb17b..000000000000 --- a/arch/s390/include/asm/cpu.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-s390/cpu.h | ||
3 | * | ||
4 | * Copyright IBM Corp. 2007 | ||
5 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_S390_CPU_H_ | ||
9 | #define _ASM_S390_CPU_H_ | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/percpu.h> | ||
13 | #include <linux/spinlock.h> | ||
14 | |||
15 | struct s390_idle_data { | ||
16 | spinlock_t lock; | ||
17 | unsigned long long idle_count; | ||
18 | unsigned long long idle_enter; | ||
19 | unsigned long long idle_time; | ||
20 | }; | ||
21 | |||
22 | DECLARE_PER_CPU(struct s390_idle_data, s390_idle); | ||
23 | |||
24 | void vtime_start_cpu(void); | ||
25 | |||
26 | static inline void s390_idle_check(void) | ||
27 | { | ||
28 | if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL) | ||
29 | vtime_start_cpu(); | ||
30 | } | ||
31 | |||
32 | #endif /* _ASM_S390_CPU_H_ */ | ||
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 941384fbd39c..ec917d42ee6d 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
@@ -9,6 +9,9 @@ | |||
9 | #ifndef _S390_CPUTIME_H | 9 | #ifndef _S390_CPUTIME_H |
10 | #define _S390_CPUTIME_H | 10 | #define _S390_CPUTIME_H |
11 | 11 | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/percpu.h> | ||
14 | #include <linux/spinlock.h> | ||
12 | #include <asm/div64.h> | 15 | #include <asm/div64.h> |
13 | 16 | ||
14 | /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ | 17 | /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ |
@@ -174,8 +177,24 @@ cputime64_to_clock_t(cputime64_t cputime) | |||
174 | return __div(cputime, 4096000000ULL / USER_HZ); | 177 | return __div(cputime, 4096000000ULL / USER_HZ); |
175 | } | 178 | } |
176 | 179 | ||
180 | struct s390_idle_data { | ||
181 | spinlock_t lock; | ||
182 | unsigned long long idle_count; | ||
183 | unsigned long long idle_enter; | ||
184 | unsigned long long idle_time; | ||
185 | }; | ||
186 | |||
187 | DECLARE_PER_CPU(struct s390_idle_data, s390_idle); | ||
188 | |||
189 | void vtime_start_cpu(void); | ||
177 | cputime64_t s390_get_idle_time(int cpu); | 190 | cputime64_t s390_get_idle_time(int cpu); |
178 | 191 | ||
179 | #define arch_idle_time(cpu) s390_get_idle_time(cpu) | 192 | #define arch_idle_time(cpu) s390_get_idle_time(cpu) |
180 | 193 | ||
194 | static inline void s390_idle_check(void) | ||
195 | { | ||
196 | if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL) | ||
197 | vtime_start_cpu(); | ||
198 | } | ||
199 | |||
181 | #endif /* _S390_CPUTIME_H */ | 200 | #endif /* _S390_CPUTIME_H */ |
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index 5a5bc75e19d4..96c14a9102b8 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h | |||
@@ -2,7 +2,28 @@ | |||
2 | #define _ASM_S390_FTRACE_H | 2 | #define _ASM_S390_FTRACE_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | |||
5 | extern void _mcount(void); | 6 | extern void _mcount(void); |
7 | extern unsigned long ftrace_dyn_func; | ||
8 | |||
9 | struct dyn_arch_ftrace { }; | ||
10 | |||
11 | #define MCOUNT_ADDR ((long)_mcount) | ||
12 | |||
13 | #ifdef CONFIG_64BIT | ||
14 | #define MCOUNT_OFFSET_RET 18 | ||
15 | #define MCOUNT_INSN_SIZE 24 | ||
16 | #define MCOUNT_OFFSET 14 | ||
17 | #else | ||
18 | #define MCOUNT_OFFSET_RET 26 | ||
19 | #define MCOUNT_INSN_SIZE 30 | ||
20 | #define MCOUNT_OFFSET 8 | ||
6 | #endif | 21 | #endif |
7 | 22 | ||
23 | static inline unsigned long ftrace_call_adjust(unsigned long addr) | ||
24 | { | ||
25 | return addr - MCOUNT_OFFSET; | ||
26 | } | ||
27 | |||
28 | #endif /* __ASSEMBLY__ */ | ||
8 | #endif /* _ASM_S390_FTRACE_H */ | 29 | #endif /* _ASM_S390_FTRACE_H */ |
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index 3aeca492b147..5046ad6b7a63 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define __LC_SUBCHANNEL_NR 0x00ba | 30 | #define __LC_SUBCHANNEL_NR 0x00ba |
31 | #define __LC_IO_INT_PARM 0x00bc | 31 | #define __LC_IO_INT_PARM 0x00bc |
32 | #define __LC_IO_INT_WORD 0x00c0 | 32 | #define __LC_IO_INT_WORD 0x00c0 |
33 | #define __LC_STFL_FAC_LIST 0x00c8 | ||
33 | #define __LC_MCCK_CODE 0x00e8 | 34 | #define __LC_MCCK_CODE 0x00e8 |
34 | 35 | ||
35 | #define __LC_DUMP_REIPL 0x0e00 | 36 | #define __LC_DUMP_REIPL 0x0e00 |
@@ -67,6 +68,7 @@ | |||
67 | #define __LC_CPUID 0x02b0 | 68 | #define __LC_CPUID 0x02b0 |
68 | #define __LC_INT_CLOCK 0x02c8 | 69 | #define __LC_INT_CLOCK 0x02c8 |
69 | #define __LC_MACHINE_FLAGS 0x02d8 | 70 | #define __LC_MACHINE_FLAGS 0x02d8 |
71 | #define __LC_FTRACE_FUNC 0x02dc | ||
70 | #define __LC_IRB 0x0300 | 72 | #define __LC_IRB 0x0300 |
71 | #define __LC_PFAULT_INTPARM 0x0080 | 73 | #define __LC_PFAULT_INTPARM 0x0080 |
72 | #define __LC_CPU_TIMER_SAVE_AREA 0x00d8 | 74 | #define __LC_CPU_TIMER_SAVE_AREA 0x00d8 |
@@ -112,6 +114,7 @@ | |||
112 | #define __LC_INT_CLOCK 0x0340 | 114 | #define __LC_INT_CLOCK 0x0340 |
113 | #define __LC_VDSO_PER_CPU 0x0350 | 115 | #define __LC_VDSO_PER_CPU 0x0350 |
114 | #define __LC_MACHINE_FLAGS 0x0358 | 116 | #define __LC_MACHINE_FLAGS 0x0358 |
117 | #define __LC_FTRACE_FUNC 0x0360 | ||
115 | #define __LC_IRB 0x0380 | 118 | #define __LC_IRB 0x0380 |
116 | #define __LC_PASTE 0x03c0 | 119 | #define __LC_PASTE 0x03c0 |
117 | #define __LC_PFAULT_INTPARM 0x11b8 | 120 | #define __LC_PFAULT_INTPARM 0x11b8 |
@@ -280,7 +283,8 @@ struct _lowcore | |||
280 | __u64 int_clock; /* 0x02c8 */ | 283 | __u64 int_clock; /* 0x02c8 */ |
281 | __u64 clock_comparator; /* 0x02d0 */ | 284 | __u64 clock_comparator; /* 0x02d0 */ |
282 | __u32 machine_flags; /* 0x02d8 */ | 285 | __u32 machine_flags; /* 0x02d8 */ |
283 | __u8 pad_0x02dc[0x0300-0x02dc]; /* 0x02dc */ | 286 | __u32 ftrace_func; /* 0x02dc */ |
287 | __u8 pad_0x02f0[0x0300-0x02f0]; /* 0x02f0 */ | ||
284 | 288 | ||
285 | /* Interrupt response block */ | 289 | /* Interrupt response block */ |
286 | __u8 irb[64]; /* 0x0300 */ | 290 | __u8 irb[64]; /* 0x0300 */ |
@@ -385,7 +389,8 @@ struct _lowcore | |||
385 | __u64 clock_comparator; /* 0x0348 */ | 389 | __u64 clock_comparator; /* 0x0348 */ |
386 | __u64 vdso_per_cpu_data; /* 0x0350 */ | 390 | __u64 vdso_per_cpu_data; /* 0x0350 */ |
387 | __u64 machine_flags; /* 0x0358 */ | 391 | __u64 machine_flags; /* 0x0358 */ |
388 | __u8 pad_0x0360[0x0380-0x0360]; /* 0x0360 */ | 392 | __u64 ftrace_func; /* 0x0360 */ |
393 | __u8 pad_0x0368[0x0380-0x0368]; /* 0x0368 */ | ||
389 | 394 | ||
390 | /* Interrupt response block. */ | 395 | /* Interrupt response block. */ |
391 | __u8 irb[64]; /* 0x0380 */ | 396 | __u8 irb[64]; /* 0x0380 */ |
diff --git a/arch/s390/include/asm/mman.h b/arch/s390/include/asm/mman.h index da01432e8f44..f63fe7b431ed 100644 --- a/arch/s390/include/asm/mman.h +++ b/arch/s390/include/asm/mman.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifndef __S390_MMAN_H__ | 9 | #ifndef __S390_MMAN_H__ |
10 | #define __S390_MMAN_H__ | 10 | #define __S390_MMAN_H__ |
11 | 11 | ||
12 | #include <asm-generic/mman.h> | 12 | #include <asm-generic/mman-common.h> |
13 | 13 | ||
14 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 14 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 32e8f6aa4384..3e3594d01f83 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h | |||
@@ -150,7 +150,7 @@ void arch_alloc_page(struct page *page, int order); | |||
150 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 150 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
151 | 151 | ||
152 | #include <asm-generic/memory_model.h> | 152 | #include <asm-generic/memory_model.h> |
153 | #include <asm-generic/page.h> | 153 | #include <asm-generic/getorder.h> |
154 | 154 | ||
155 | #define __HAVE_ARCH_GATE_AREA 1 | 155 | #define __HAVE_ARCH_GATE_AREA 1 |
156 | 156 | ||
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 5caddd4f7bed..60a7b1a1702f 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -112,12 +112,15 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
112 | * effect, this also makes sure that 64 bit module code cannot be used | 112 | * effect, this also makes sure that 64 bit module code cannot be used |
113 | * as system call address. | 113 | * as system call address. |
114 | */ | 114 | */ |
115 | |||
116 | extern unsigned long VMALLOC_START; | ||
117 | |||
115 | #ifndef __s390x__ | 118 | #ifndef __s390x__ |
116 | #define VMALLOC_START 0x78000000UL | 119 | #define VMALLOC_SIZE (96UL << 20) |
117 | #define VMALLOC_END 0x7e000000UL | 120 | #define VMALLOC_END 0x7e000000UL |
118 | #define VMEM_MAP_END 0x80000000UL | 121 | #define VMEM_MAP_END 0x80000000UL |
119 | #else /* __s390x__ */ | 122 | #else /* __s390x__ */ |
120 | #define VMALLOC_START 0x3e000000000UL | 123 | #define VMALLOC_SIZE (1UL << 30) |
121 | #define VMALLOC_END 0x3e040000000UL | 124 | #define VMALLOC_END 0x3e040000000UL |
122 | #define VMEM_MAP_END 0x40000000000UL | 125 | #define VMEM_MAP_END 0x40000000000UL |
123 | #endif /* __s390x__ */ | 126 | #endif /* __s390x__ */ |
diff --git a/arch/s390/include/asm/seccomp.h b/arch/s390/include/asm/seccomp.h new file mode 100644 index 000000000000..781a9cf9b002 --- /dev/null +++ b/arch/s390/include/asm/seccomp.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _ASM_S390_SECCOMP_H | ||
2 | #define _ASM_S390_SECCOMP_H | ||
3 | |||
4 | #include <linux/unistd.h> | ||
5 | |||
6 | #define __NR_seccomp_read __NR_read | ||
7 | #define __NR_seccomp_write __NR_write | ||
8 | #define __NR_seccomp_exit __NR_exit | ||
9 | #define __NR_seccomp_sigreturn __NR_sigreturn | ||
10 | |||
11 | #define __NR_seccomp_read_32 __NR_read | ||
12 | #define __NR_seccomp_write_32 __NR_write | ||
13 | #define __NR_seccomp_exit_32 __NR_exit | ||
14 | #define __NR_seccomp_sigreturn_32 __NR_sigreturn | ||
15 | |||
16 | #endif /* _ASM_S390_SECCOMP_H */ | ||
diff --git a/arch/s390/include/asm/signal.h b/arch/s390/include/asm/signal.h index f6cfddb278cb..cdf5cb2fe03f 100644 --- a/arch/s390/include/asm/signal.h +++ b/arch/s390/include/asm/signal.h | |||
@@ -115,7 +115,7 @@ typedef unsigned long sigset_t; | |||
115 | #define MINSIGSTKSZ 2048 | 115 | #define MINSIGSTKSZ 2048 |
116 | #define SIGSTKSZ 8192 | 116 | #define SIGSTKSZ 8192 |
117 | 117 | ||
118 | #include <asm-generic/signal.h> | 118 | #include <asm-generic/signal-defs.h> |
119 | 119 | ||
120 | #ifdef __KERNEL__ | 120 | #ifdef __KERNEL__ |
121 | struct old_sigaction { | 121 | struct old_sigaction { |
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h index f3861b09ebb0..c9af0d19c7ab 100644 --- a/arch/s390/include/asm/spinlock.h +++ b/arch/s390/include/asm/spinlock.h | |||
@@ -122,8 +122,10 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lp) | |||
122 | #define __raw_write_can_lock(x) ((x)->lock == 0) | 122 | #define __raw_write_can_lock(x) ((x)->lock == 0) |
123 | 123 | ||
124 | extern void _raw_read_lock_wait(raw_rwlock_t *lp); | 124 | extern void _raw_read_lock_wait(raw_rwlock_t *lp); |
125 | extern void _raw_read_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); | ||
125 | extern int _raw_read_trylock_retry(raw_rwlock_t *lp); | 126 | extern int _raw_read_trylock_retry(raw_rwlock_t *lp); |
126 | extern void _raw_write_lock_wait(raw_rwlock_t *lp); | 127 | extern void _raw_write_lock_wait(raw_rwlock_t *lp); |
128 | extern void _raw_write_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); | ||
127 | extern int _raw_write_trylock_retry(raw_rwlock_t *lp); | 129 | extern int _raw_write_trylock_retry(raw_rwlock_t *lp); |
128 | 130 | ||
129 | static inline void __raw_read_lock(raw_rwlock_t *rw) | 131 | static inline void __raw_read_lock(raw_rwlock_t *rw) |
@@ -134,6 +136,14 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
134 | _raw_read_lock_wait(rw); | 136 | _raw_read_lock_wait(rw); |
135 | } | 137 | } |
136 | 138 | ||
139 | static inline void __raw_read_lock_flags(raw_rwlock_t *rw, unsigned long flags) | ||
140 | { | ||
141 | unsigned int old; | ||
142 | old = rw->lock & 0x7fffffffU; | ||
143 | if (_raw_compare_and_swap(&rw->lock, old, old + 1) != old) | ||
144 | _raw_read_lock_wait_flags(rw, flags); | ||
145 | } | ||
146 | |||
137 | static inline void __raw_read_unlock(raw_rwlock_t *rw) | 147 | static inline void __raw_read_unlock(raw_rwlock_t *rw) |
138 | { | 148 | { |
139 | unsigned int old, cmp; | 149 | unsigned int old, cmp; |
@@ -151,6 +161,12 @@ static inline void __raw_write_lock(raw_rwlock_t *rw) | |||
151 | _raw_write_lock_wait(rw); | 161 | _raw_write_lock_wait(rw); |
152 | } | 162 | } |
153 | 163 | ||
164 | static inline void __raw_write_lock_flags(raw_rwlock_t *rw, unsigned long flags) | ||
165 | { | ||
166 | if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) | ||
167 | _raw_write_lock_wait_flags(rw, flags); | ||
168 | } | ||
169 | |||
154 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 170 | static inline void __raw_write_unlock(raw_rwlock_t *rw) |
155 | { | 171 | { |
156 | _raw_compare_and_swap(&rw->lock, 0x80000000, 0); | 172 | _raw_compare_and_swap(&rw->lock, 0x80000000, 0); |
@@ -172,9 +188,6 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
172 | return _raw_write_trylock_retry(rw); | 188 | return _raw_write_trylock_retry(rw); |
173 | } | 189 | } |
174 | 190 | ||
175 | #define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) | ||
176 | #define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) | ||
177 | |||
178 | #define _raw_read_relax(lock) cpu_relax() | 191 | #define _raw_read_relax(lock) cpu_relax() |
179 | #define _raw_write_relax(lock) cpu_relax() | 192 | #define _raw_write_relax(lock) cpu_relax() |
180 | 193 | ||
diff --git a/arch/s390/include/asm/suspend.h b/arch/s390/include/asm/suspend.h deleted file mode 100644 index 1f34580e67a7..000000000000 --- a/arch/s390/include/asm/suspend.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #ifndef __ASM_S390_SUSPEND_H | ||
2 | #define __ASM_S390_SUSPEND_H | ||
3 | |||
4 | #endif | ||
5 | |||
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index 2429b87eb28d..e0a73d3eb837 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef _ASM_SYSCALL_H | 12 | #ifndef _ASM_SYSCALL_H |
13 | #define _ASM_SYSCALL_H 1 | 13 | #define _ASM_SYSCALL_H 1 |
14 | 14 | ||
15 | #include <linux/sched.h> | ||
15 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
16 | 17 | ||
17 | static inline long syscall_get_nr(struct task_struct *task, | 18 | static inline long syscall_get_nr(struct task_struct *task, |
diff --git a/arch/s390/include/asm/termios.h b/arch/s390/include/asm/termios.h index 67f66278f533..bc3a35cefc96 100644 --- a/arch/s390/include/asm/termios.h +++ b/arch/s390/include/asm/termios.h | |||
@@ -60,7 +60,7 @@ struct termio { | |||
60 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | 60 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
61 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | 61 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
62 | 62 | ||
63 | #include <asm-generic/termios.h> | 63 | #include <asm-generic/termios-base.h> |
64 | 64 | ||
65 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
66 | 66 | ||
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 461f2abd2e6f..925bcc649035 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -83,14 +83,16 @@ static inline struct thread_info *current_thread_info(void) | |||
83 | /* | 83 | /* |
84 | * thread information flags bit numbers | 84 | * thread information flags bit numbers |
85 | */ | 85 | */ |
86 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | ||
87 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ | 86 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ |
88 | #define TIF_SIGPENDING 2 /* signal pending */ | 87 | #define TIF_SIGPENDING 2 /* signal pending */ |
89 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 88 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
90 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ | 89 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ |
91 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ | ||
92 | #define TIF_SINGLE_STEP 6 /* deliver sigtrap on return to user */ | 90 | #define TIF_SINGLE_STEP 6 /* deliver sigtrap on return to user */ |
93 | #define TIF_MCCK_PENDING 7 /* machine check handling is pending */ | 91 | #define TIF_MCCK_PENDING 7 /* machine check handling is pending */ |
92 | #define TIF_SYSCALL_TRACE 8 /* syscall trace active */ | ||
93 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ | ||
94 | #define TIF_SECCOMP 10 /* secure computing */ | ||
95 | #define TIF_SYSCALL_FTRACE 11 /* ftrace syscall instrumentation */ | ||
94 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 96 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
95 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling | 97 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling |
96 | TIF_NEED_RESCHED */ | 98 | TIF_NEED_RESCHED */ |
@@ -99,15 +101,17 @@ static inline struct thread_info *current_thread_info(void) | |||
99 | #define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */ | 101 | #define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */ |
100 | #define TIF_FREEZE 21 /* thread is freezing for suspend */ | 102 | #define TIF_FREEZE 21 /* thread is freezing for suspend */ |
101 | 103 | ||
102 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | ||
103 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 104 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
104 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 105 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
105 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 106 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
106 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 107 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
107 | #define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC) | 108 | #define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC) |
108 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | ||
109 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) | 109 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) |
110 | #define _TIF_MCCK_PENDING (1<<TIF_MCCK_PENDING) | 110 | #define _TIF_MCCK_PENDING (1<<TIF_MCCK_PENDING) |
111 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | ||
112 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | ||
113 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | ||
114 | #define _TIF_SYSCALL_FTRACE (1<<TIF_SYSCALL_FTRACE) | ||
111 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 115 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
112 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 116 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
113 | #define _TIF_31BIT (1<<TIF_31BIT) | 117 | #define _TIF_31BIT (1<<TIF_31BIT) |
diff --git a/arch/s390/include/asm/types.h b/arch/s390/include/asm/types.h index 3dc3fc228812..04d6b95a89c6 100644 --- a/arch/s390/include/asm/types.h +++ b/arch/s390/include/asm/types.h | |||
@@ -28,12 +28,6 @@ typedef __signed__ long saddr_t; | |||
28 | */ | 28 | */ |
29 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
30 | 30 | ||
31 | #ifndef __s390x__ | ||
32 | #define BITS_PER_LONG 32 | ||
33 | #else | ||
34 | #define BITS_PER_LONG 64 | ||
35 | #endif | ||
36 | |||
37 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
38 | 32 | ||
39 | typedef u64 dma64_addr_t; | 33 | typedef u64 dma64_addr_t; |
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h index 0235970278f0..8377e91533d2 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h | |||
@@ -131,7 +131,7 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | |||
131 | 131 | ||
132 | #define put_user(x, ptr) \ | 132 | #define put_user(x, ptr) \ |
133 | ({ \ | 133 | ({ \ |
134 | might_sleep(); \ | 134 | might_fault(); \ |
135 | __put_user(x, ptr); \ | 135 | __put_user(x, ptr); \ |
136 | }) | 136 | }) |
137 | 137 | ||
@@ -180,7 +180,7 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
180 | 180 | ||
181 | #define get_user(x, ptr) \ | 181 | #define get_user(x, ptr) \ |
182 | ({ \ | 182 | ({ \ |
183 | might_sleep(); \ | 183 | might_fault(); \ |
184 | __get_user(x, ptr); \ | 184 | __get_user(x, ptr); \ |
185 | }) | 185 | }) |
186 | 186 | ||
@@ -231,7 +231,7 @@ __copy_to_user(void __user *to, const void *from, unsigned long n) | |||
231 | static inline unsigned long __must_check | 231 | static inline unsigned long __must_check |
232 | copy_to_user(void __user *to, const void *from, unsigned long n) | 232 | copy_to_user(void __user *to, const void *from, unsigned long n) |
233 | { | 233 | { |
234 | might_sleep(); | 234 | might_fault(); |
235 | if (access_ok(VERIFY_WRITE, to, n)) | 235 | if (access_ok(VERIFY_WRITE, to, n)) |
236 | n = __copy_to_user(to, from, n); | 236 | n = __copy_to_user(to, from, n); |
237 | return n; | 237 | return n; |
@@ -282,7 +282,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n) | |||
282 | static inline unsigned long __must_check | 282 | static inline unsigned long __must_check |
283 | copy_from_user(void *to, const void __user *from, unsigned long n) | 283 | copy_from_user(void *to, const void __user *from, unsigned long n) |
284 | { | 284 | { |
285 | might_sleep(); | 285 | might_fault(); |
286 | if (access_ok(VERIFY_READ, from, n)) | 286 | if (access_ok(VERIFY_READ, from, n)) |
287 | n = __copy_from_user(to, from, n); | 287 | n = __copy_from_user(to, from, n); |
288 | else | 288 | else |
@@ -299,7 +299,7 @@ __copy_in_user(void __user *to, const void __user *from, unsigned long n) | |||
299 | static inline unsigned long __must_check | 299 | static inline unsigned long __must_check |
300 | copy_in_user(void __user *to, const void __user *from, unsigned long n) | 300 | copy_in_user(void __user *to, const void __user *from, unsigned long n) |
301 | { | 301 | { |
302 | might_sleep(); | 302 | might_fault(); |
303 | if (__access_ok(from,n) && __access_ok(to,n)) | 303 | if (__access_ok(from,n) && __access_ok(to,n)) |
304 | n = __copy_in_user(to, from, n); | 304 | n = __copy_in_user(to, from, n); |
305 | return n; | 305 | return n; |
@@ -312,7 +312,7 @@ static inline long __must_check | |||
312 | strncpy_from_user(char *dst, const char __user *src, long count) | 312 | strncpy_from_user(char *dst, const char __user *src, long count) |
313 | { | 313 | { |
314 | long res = -EFAULT; | 314 | long res = -EFAULT; |
315 | might_sleep(); | 315 | might_fault(); |
316 | if (access_ok(VERIFY_READ, src, 1)) | 316 | if (access_ok(VERIFY_READ, src, 1)) |
317 | res = uaccess.strncpy_from_user(count, src, dst); | 317 | res = uaccess.strncpy_from_user(count, src, dst); |
318 | return res; | 318 | return res; |
@@ -321,7 +321,7 @@ strncpy_from_user(char *dst, const char __user *src, long count) | |||
321 | static inline unsigned long | 321 | static inline unsigned long |
322 | strnlen_user(const char __user * src, unsigned long n) | 322 | strnlen_user(const char __user * src, unsigned long n) |
323 | { | 323 | { |
324 | might_sleep(); | 324 | might_fault(); |
325 | return uaccess.strnlen_user(n, src); | 325 | return uaccess.strnlen_user(n, src); |
326 | } | 326 | } |
327 | 327 | ||
@@ -354,7 +354,7 @@ __clear_user(void __user *to, unsigned long n) | |||
354 | static inline unsigned long __must_check | 354 | static inline unsigned long __must_check |
355 | clear_user(void __user *to, unsigned long n) | 355 | clear_user(void __user *to, unsigned long n) |
356 | { | 356 | { |
357 | might_sleep(); | 357 | might_fault(); |
358 | if (access_ok(VERIFY_WRITE, to, n)) | 358 | if (access_ok(VERIFY_WRITE, to, n)) |
359 | n = uaccess.clear_user(n, to); | 359 | n = uaccess.clear_user(n, to); |
360 | return n; | 360 | return n; |
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h index f0f19e6ace6c..c80602d7c880 100644 --- a/arch/s390/include/asm/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
@@ -267,7 +267,9 @@ | |||
267 | #define __NR_epoll_create1 327 | 267 | #define __NR_epoll_create1 327 |
268 | #define __NR_preadv 328 | 268 | #define __NR_preadv 328 |
269 | #define __NR_pwritev 329 | 269 | #define __NR_pwritev 329 |
270 | #define NR_syscalls 330 | 270 | #define __NR_rt_tgsigqueueinfo 330 |
271 | #define __NR_perf_counter_open 331 | ||
272 | #define NR_syscalls 332 | ||
271 | 273 | ||
272 | /* | 274 | /* |
273 | * There are some system calls that are not present on 64 bit, some | 275 | * There are some system calls that are not present on 64 bit, some |