diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-17 01:46:26 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-17 01:47:06 -0400 |
commit | a806170e29c5468b1d641a22518243bdf1b8d58b (patch) | |
tree | 0b1661f287d6e2b711bbd7600120a250a4f57549 | |
parent | 5a62b192196af9a798e2f2f4c6a1324e7edf2f4b (diff) |
[S390] Fix a lot of sparse warnings.
Most noteable part of this commit is the new local header file entry.h
which contains all the function declarations of functions that get only
called from asm code or are arch internal. That way we can avoid extern
declarations in C files.
This is more or less the same that was done for sparc64.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r-- | arch/s390/kernel/compat_linux.h | 73 | ||||
-rw-r--r-- | arch/s390/kernel/compat_signal.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/debug.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/early.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/entry.h | 60 | ||||
-rw-r--r-- | arch/s390/kernel/ipl.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/ptrace.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/s390_ext.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/signal.c | 6 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 3 | ||||
-rw-r--r-- | arch/s390/kernel/sys_s390.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 5 | ||||
-rw-r--r-- | arch/s390/mm/fault.c | 13 | ||||
-rw-r--r-- | drivers/s390/block/dasd.c | 5 | ||||
-rw-r--r-- | drivers/s390/block/dasd_alias.c | 49 | ||||
-rw-r--r-- | drivers/s390/cio/cio.c | 18 | ||||
-rw-r--r-- | drivers/s390/cio/cio.h | 1 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 1 | ||||
-rw-r--r-- | drivers/s390/cio/device.h | 1 | ||||
-rw-r--r-- | drivers/s390/s390mach.h | 4 | ||||
-rw-r--r-- | include/asm-s390/cio.h | 4 | ||||
-rw-r--r-- | include/asm-s390/timex.h | 1 | ||||
-rw-r--r-- | include/asm-s390/tlbflush.h | 3 |
26 files changed, 198 insertions, 64 deletions
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index e89f8c0c42a0..20723a062017 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h | |||
@@ -162,4 +162,77 @@ struct ucontext32 { | |||
162 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | 162 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
163 | }; | 163 | }; |
164 | 164 | ||
165 | struct __sysctl_args32; | ||
166 | struct stat64_emu31; | ||
167 | struct mmap_arg_struct_emu31; | ||
168 | struct fadvise64_64_args; | ||
169 | struct old_sigaction32; | ||
170 | struct old_sigaction32; | ||
171 | |||
172 | long sys32_chown16(const char __user * filename, u16 user, u16 group); | ||
173 | long sys32_lchown16(const char __user * filename, u16 user, u16 group); | ||
174 | long sys32_fchown16(unsigned int fd, u16 user, u16 group); | ||
175 | long sys32_setregid16(u16 rgid, u16 egid); | ||
176 | long sys32_setgid16(u16 gid); | ||
177 | long sys32_setreuid16(u16 ruid, u16 euid); | ||
178 | long sys32_setuid16(u16 uid); | ||
179 | long sys32_setresuid16(u16 ruid, u16 euid, u16 suid); | ||
180 | long sys32_getresuid16(u16 __user *ruid, u16 __user *euid, u16 __user *suid); | ||
181 | long sys32_setresgid16(u16 rgid, u16 egid, u16 sgid); | ||
182 | long sys32_getresgid16(u16 __user *rgid, u16 __user *egid, u16 __user *sgid); | ||
183 | long sys32_setfsuid16(u16 uid); | ||
184 | long sys32_setfsgid16(u16 gid); | ||
185 | long sys32_getgroups16(int gidsetsize, u16 __user *grouplist); | ||
186 | long sys32_setgroups16(int gidsetsize, u16 __user *grouplist); | ||
187 | long sys32_getuid16(void); | ||
188 | long sys32_geteuid16(void); | ||
189 | long sys32_getgid16(void); | ||
190 | long sys32_getegid16(void); | ||
191 | long sys32_ipc(u32 call, int first, int second, int third, u32 ptr); | ||
192 | long sys32_truncate64(const char __user * path, unsigned long high, | ||
193 | unsigned long low); | ||
194 | long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low); | ||
195 | long sys32_sched_rr_get_interval(compat_pid_t pid, | ||
196 | struct compat_timespec __user *interval); | ||
197 | long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, | ||
198 | compat_sigset_t __user *oset, size_t sigsetsize); | ||
199 | long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize); | ||
200 | long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); | ||
201 | long sys32_execve(void); | ||
202 | long sys32_init_module(void __user *umod, unsigned long len, | ||
203 | const char __user *uargs); | ||
204 | long sys32_delete_module(const char __user *name_user, unsigned int flags); | ||
205 | long sys32_gettimeofday(struct compat_timeval __user *tv, | ||
206 | struct timezone __user *tz); | ||
207 | long sys32_settimeofday(struct compat_timeval __user *tv, | ||
208 | struct timezone __user *tz); | ||
209 | long sys32_pause(void); | ||
210 | long sys32_pread64(unsigned int fd, char __user *ubuf, size_t count, | ||
211 | u32 poshi, u32 poslo); | ||
212 | long sys32_pwrite64(unsigned int fd, const char __user *ubuf, | ||
213 | size_t count, u32 poshi, u32 poslo); | ||
214 | compat_ssize_t sys32_readahead(int fd, u32 offhi, u32 offlo, s32 count); | ||
215 | long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, | ||
216 | size_t count); | ||
217 | long sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, | ||
218 | s32 count); | ||
219 | long sys32_sysctl(struct __sysctl_args32 __user *args); | ||
220 | long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf); | ||
221 | long sys32_lstat64(char __user * filename, | ||
222 | struct stat64_emu31 __user * statbuf); | ||
223 | long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * statbuf); | ||
224 | long sys32_fstatat64(unsigned int dfd, char __user *filename, | ||
225 | struct stat64_emu31 __user* statbuf, int flag); | ||
226 | unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg); | ||
227 | long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg); | ||
228 | long sys32_read(unsigned int fd, char __user * buf, size_t count); | ||
229 | long sys32_write(unsigned int fd, char __user * buf, size_t count); | ||
230 | long sys32_clone(void); | ||
231 | long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); | ||
232 | long sys32_fadvise64_64(struct fadvise64_64_args __user *args); | ||
233 | long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | ||
234 | struct old_sigaction32 __user *oact); | ||
235 | long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, | ||
236 | struct sigaction32 __user *oact, size_t sigsetsize); | ||
237 | long sys32_sigaltstack(const stack_t32 __user *uss, stack_t32 __user *uoss); | ||
165 | #endif /* _ASM_S390X_S390_H */ | 238 | #endif /* _ASM_S390X_S390_H */ |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index ae2f2d313930..c7f02e777af2 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/lowcore.h> | 29 | #include <asm/lowcore.h> |
30 | #include "compat_linux.h" | 30 | #include "compat_linux.h" |
31 | #include "compat_ptrace.h" | 31 | #include "compat_ptrace.h" |
32 | #include "entry.h" | ||
32 | 33 | ||
33 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 34 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
34 | 35 | ||
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 95a46bc008b7..1e7d4ac7068b 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -157,7 +157,7 @@ struct debug_view debug_sprintf_view = { | |||
157 | }; | 157 | }; |
158 | 158 | ||
159 | /* used by dump analysis tools to determine version of debug feature */ | 159 | /* used by dump analysis tools to determine version of debug feature */ |
160 | unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION; | 160 | static unsigned int __used debug_feature_version = __DEBUG_FEATURE_VERSION; |
161 | 161 | ||
162 | /* static globals */ | 162 | /* static globals */ |
163 | 163 | ||
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 01832c440636..540a67f979b6 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
22 | #include <asm/cpcmd.h> | 22 | #include <asm/cpcmd.h> |
23 | #include <asm/sclp.h> | 23 | #include <asm/sclp.h> |
24 | #include "entry.h" | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * Create a Kernel NSS if the SAVESYS= parameter is defined | 27 | * Create a Kernel NSS if the SAVESYS= parameter is defined |
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h new file mode 100644 index 000000000000..6b1896345eda --- /dev/null +++ b/arch/s390/kernel/entry.h | |||
@@ -0,0 +1,60 @@ | |||
1 | #ifndef _ENTRY_H | ||
2 | #define _ENTRY_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/signal.h> | ||
6 | #include <asm/ptrace.h> | ||
7 | |||
8 | typedef void pgm_check_handler_t(struct pt_regs *, long); | ||
9 | extern pgm_check_handler_t *pgm_check_table[128]; | ||
10 | pgm_check_handler_t do_protection_exception; | ||
11 | pgm_check_handler_t do_dat_exception; | ||
12 | |||
13 | extern int sysctl_userprocess_debug; | ||
14 | |||
15 | void do_single_step(struct pt_regs *regs); | ||
16 | void syscall_trace(struct pt_regs *regs, int entryexit); | ||
17 | void kernel_stack_overflow(struct pt_regs * regs); | ||
18 | void do_signal(struct pt_regs *regs); | ||
19 | int handle_signal32(unsigned long sig, struct k_sigaction *ka, | ||
20 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs); | ||
21 | |||
22 | void do_extint(struct pt_regs *regs, unsigned short code); | ||
23 | int __cpuinit start_secondary(void *cpuvoid); | ||
24 | void __init startup_init(void); | ||
25 | void die(const char * str, struct pt_regs * regs, long err); | ||
26 | |||
27 | struct new_utsname; | ||
28 | struct mmap_arg_struct; | ||
29 | struct fadvise64_64_args; | ||
30 | struct old_sigaction; | ||
31 | struct sel_arg_struct; | ||
32 | |||
33 | long sys_pipe(unsigned long __user *fildes); | ||
34 | long sys_mmap2(struct mmap_arg_struct __user *arg); | ||
35 | long old_mmap(struct mmap_arg_struct __user *arg); | ||
36 | long sys_ipc(uint call, int first, unsigned long second, | ||
37 | unsigned long third, void __user *ptr); | ||
38 | long s390x_newuname(struct new_utsname __user *name); | ||
39 | long s390x_personality(unsigned long personality); | ||
40 | long s390_fadvise64(int fd, u32 offset_high, u32 offset_low, | ||
41 | size_t len, int advice); | ||
42 | long s390_fadvise64_64(struct fadvise64_64_args __user *args); | ||
43 | long s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, u32 len_low); | ||
44 | long sys_fork(void); | ||
45 | long sys_clone(void); | ||
46 | long sys_vfork(void); | ||
47 | void execve_tail(void); | ||
48 | long sys_execve(void); | ||
49 | int sys_sigsuspend(int history0, int history1, old_sigset_t mask); | ||
50 | long sys_sigaction(int sig, const struct old_sigaction __user *act, | ||
51 | struct old_sigaction __user *oact); | ||
52 | long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss); | ||
53 | long sys_sigreturn(void); | ||
54 | long sys_rt_sigreturn(void); | ||
55 | long sys32_sigreturn(void); | ||
56 | long sys32_rt_sigreturn(void); | ||
57 | long old_select(struct sel_arg_struct __user *arg); | ||
58 | long sys_ptrace(long request, long pid, long addr, long data); | ||
59 | |||
60 | #endif /* _ENTRY_H */ | ||
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 375232c46c7a..532542447d66 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -655,7 +655,7 @@ static struct kobj_attribute reipl_type_attr = | |||
655 | 655 | ||
656 | static struct kset *reipl_kset; | 656 | static struct kset *reipl_kset; |
657 | 657 | ||
658 | void reipl_run(struct shutdown_trigger *trigger) | 658 | static void reipl_run(struct shutdown_trigger *trigger) |
659 | { | 659 | { |
660 | struct ccw_dev_id devid; | 660 | struct ccw_dev_id devid; |
661 | static char buf[100]; | 661 | static char buf[100]; |
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index c5549a206284..ed04d1372d5d 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
@@ -360,7 +360,7 @@ no_kprobe: | |||
360 | * - When the probed function returns, this probe | 360 | * - When the probed function returns, this probe |
361 | * causes the handlers to fire | 361 | * causes the handlers to fire |
362 | */ | 362 | */ |
363 | void kretprobe_trampoline_holder(void) | 363 | static void __used kretprobe_trampoline_holder(void) |
364 | { | 364 | { |
365 | asm volatile(".global kretprobe_trampoline\n" | 365 | asm volatile(".global kretprobe_trampoline\n" |
366 | "kretprobe_trampoline: bcr 0,0\n"); | 366 | "kretprobe_trampoline: bcr 0,0\n"); |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index df033249f6b1..dbefd0db395f 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/notifier.h> | 37 | #include <linux/notifier.h> |
38 | #include <linux/utsname.h> | 38 | #include <linux/utsname.h> |
39 | #include <linux/tick.h> | 39 | #include <linux/tick.h> |
40 | #include <linux/elfcore.h> | ||
40 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
41 | #include <asm/pgtable.h> | 42 | #include <asm/pgtable.h> |
42 | #include <asm/system.h> | 43 | #include <asm/system.h> |
@@ -45,6 +46,7 @@ | |||
45 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
46 | #include <asm/timer.h> | 47 | #include <asm/timer.h> |
47 | #include <asm/cpu.h> | 48 | #include <asm/cpu.h> |
49 | #include "entry.h" | ||
48 | 50 | ||
49 | asmlinkage void ret_from_fork(void) asm ("ret_from_fork"); | 51 | asmlinkage void ret_from_fork(void) asm ("ret_from_fork"); |
50 | 52 | ||
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 6e036bae9875..58a064296987 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/system.h> | 41 | #include <asm/system.h> |
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
43 | #include <asm/unistd.h> | 43 | #include <asm/unistd.h> |
44 | #include "entry.h" | ||
44 | 45 | ||
45 | #ifdef CONFIG_COMPAT | 46 | #ifdef CONFIG_COMPAT |
46 | #include "compat_ptrace.h" | 47 | #include "compat_ptrace.h" |
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c index 947d8c74403b..e019b419efc6 100644 --- a/arch/s390/kernel/s390_ext.c +++ b/arch/s390/kernel/s390_ext.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/s390_ext.h> | 18 | #include <asm/s390_ext.h> |
19 | #include <asm/irq_regs.h> | 19 | #include <asm/irq_regs.h> |
20 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
21 | #include "entry.h" | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * ext_int_hash[index] is the start of the list for all external interrupts | 24 | * ext_int_hash[index] is the start of the list for all external interrupts |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 8c92191949c2..b97682040215 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/ucontext.h> | 27 | #include <asm/ucontext.h> |
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/lowcore.h> | 29 | #include <asm/lowcore.h> |
30 | #include "entry.h" | ||
30 | 31 | ||
31 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 32 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
32 | 33 | ||
@@ -484,11 +485,6 @@ void do_signal(struct pt_regs *regs) | |||
484 | int ret; | 485 | int ret; |
485 | #ifdef CONFIG_COMPAT | 486 | #ifdef CONFIG_COMPAT |
486 | if (test_thread_flag(TIF_31BIT)) { | 487 | if (test_thread_flag(TIF_31BIT)) { |
487 | extern int handle_signal32(unsigned long sig, | ||
488 | struct k_sigaction *ka, | ||
489 | siginfo_t *info, | ||
490 | sigset_t *oldset, | ||
491 | struct pt_regs *regs); | ||
492 | ret = handle_signal32(signr, &ka, &info, oldset, regs); | 488 | ret = handle_signal32(signr, &ka, &info, oldset, regs); |
493 | } | 489 | } |
494 | else | 490 | else |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 5a445b1b1217..0dfa988c1b26 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/lowcore.h> | 44 | #include <asm/lowcore.h> |
45 | #include <asm/sclp.h> | 45 | #include <asm/sclp.h> |
46 | #include <asm/cpu.h> | 46 | #include <asm/cpu.h> |
47 | #include "entry.h" | ||
47 | 48 | ||
48 | /* | 49 | /* |
49 | * An array with a pointer the lowcore of every CPU. | 50 | * An array with a pointer the lowcore of every CPU. |
@@ -297,7 +298,7 @@ static void smp_ext_bitcall(int cpu, ec_bit_sig sig) | |||
297 | /* | 298 | /* |
298 | * this function sends a 'purge tlb' signal to another CPU. | 299 | * this function sends a 'purge tlb' signal to another CPU. |
299 | */ | 300 | */ |
300 | void smp_ptlb_callback(void *info) | 301 | static void smp_ptlb_callback(void *info) |
301 | { | 302 | { |
302 | __tlb_flush_local(); | 303 | __tlb_flush_local(); |
303 | } | 304 | } |
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index fefee99f28aa..988d0d64c2c8 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/personality.h> | 29 | #include <linux/personality.h> |
30 | #include <linux/unistd.h> | 30 | #include <linux/unistd.h> |
31 | #include <linux/ipc.h> | 31 | #include <linux/ipc.h> |
32 | |||
33 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | #include "entry.h" | ||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * sys_pipe() is the normal C calling standard for creating | 36 | * sys_pipe() is the normal C calling standard for creating |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 17c4de9e1b6b..7aec676fefd5 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/irq_regs.h> | 39 | #include <asm/irq_regs.h> |
40 | #include <asm/timer.h> | 40 | #include <asm/timer.h> |
41 | #include <asm/etr.h> | 41 | #include <asm/etr.h> |
42 | #include <asm/cio.h> | ||
42 | 43 | ||
43 | /* change this if you have some constant time drift */ | 44 | /* change this if you have some constant time drift */ |
44 | #define USECS_PER_JIFFY ((unsigned long) 1000000/HZ) | 45 | #define USECS_PER_JIFFY ((unsigned long) 1000000/HZ) |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 9452a205629b..b3524134f213 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -42,11 +42,8 @@ | |||
42 | #include <asm/s390_ext.h> | 42 | #include <asm/s390_ext.h> |
43 | #include <asm/lowcore.h> | 43 | #include <asm/lowcore.h> |
44 | #include <asm/debug.h> | 44 | #include <asm/debug.h> |
45 | #include "entry.h" | ||
45 | 46 | ||
46 | /* Called from entry.S only */ | ||
47 | extern void handle_per_exception(struct pt_regs *regs); | ||
48 | |||
49 | typedef void pgm_check_handler_t(struct pt_regs *, long); | ||
50 | pgm_check_handler_t *pgm_check_table[128]; | 47 | pgm_check_handler_t *pgm_check_table[128]; |
51 | 48 | ||
52 | #ifdef CONFIG_SYSCTL | 49 | #ifdef CONFIG_SYSCTL |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index a9c635f01db8..2650f46001d0 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -28,11 +28,11 @@ | |||
28 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
29 | #include <linux/kprobes.h> | 29 | #include <linux/kprobes.h> |
30 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | |||
32 | #include <asm/system.h> | 31 | #include <asm/system.h> |
33 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
34 | #include <asm/s390_ext.h> | 33 | #include <asm/s390_ext.h> |
35 | #include <asm/mmu_context.h> | 34 | #include <asm/mmu_context.h> |
35 | #include "../kernel/entry.h" | ||
36 | 36 | ||
37 | #ifndef CONFIG_64BIT | 37 | #ifndef CONFIG_64BIT |
38 | #define __FAIL_ADDR_MASK 0x7ffff000 | 38 | #define __FAIL_ADDR_MASK 0x7ffff000 |
@@ -50,8 +50,6 @@ | |||
50 | extern int sysctl_userprocess_debug; | 50 | extern int sysctl_userprocess_debug; |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | extern void die(const char *,struct pt_regs *,long); | ||
54 | |||
55 | #ifdef CONFIG_KPROBES | 53 | #ifdef CONFIG_KPROBES |
56 | static inline int notify_page_fault(struct pt_regs *regs, long err) | 54 | static inline int notify_page_fault(struct pt_regs *regs, long err) |
57 | { | 55 | { |
@@ -245,11 +243,6 @@ static void do_sigbus(struct pt_regs *regs, unsigned long error_code, | |||
245 | } | 243 | } |
246 | 244 | ||
247 | #ifdef CONFIG_S390_EXEC_PROTECT | 245 | #ifdef CONFIG_S390_EXEC_PROTECT |
248 | extern long sys_sigreturn(void); | ||
249 | extern long sys_rt_sigreturn(void); | ||
250 | extern long sys32_sigreturn(void); | ||
251 | extern long sys32_rt_sigreturn(void); | ||
252 | |||
253 | static int signal_return(struct mm_struct *mm, struct pt_regs *regs, | 246 | static int signal_return(struct mm_struct *mm, struct pt_regs *regs, |
254 | unsigned long address, unsigned long error_code) | 247 | unsigned long address, unsigned long error_code) |
255 | { | 248 | { |
@@ -424,7 +417,7 @@ no_context: | |||
424 | } | 417 | } |
425 | 418 | ||
426 | void __kprobes do_protection_exception(struct pt_regs *regs, | 419 | void __kprobes do_protection_exception(struct pt_regs *regs, |
427 | unsigned long error_code) | 420 | long error_code) |
428 | { | 421 | { |
429 | /* Protection exception is supressing, decrement psw address. */ | 422 | /* Protection exception is supressing, decrement psw address. */ |
430 | regs->psw.addr -= (error_code >> 16); | 423 | regs->psw.addr -= (error_code >> 16); |
@@ -440,7 +433,7 @@ void __kprobes do_protection_exception(struct pt_regs *regs, | |||
440 | do_exception(regs, 4, 1); | 433 | do_exception(regs, 4, 1); |
441 | } | 434 | } |
442 | 435 | ||
443 | void __kprobes do_dat_exception(struct pt_regs *regs, unsigned long error_code) | 436 | void __kprobes do_dat_exception(struct pt_regs *regs, long error_code) |
444 | { | 437 | { |
445 | do_exception(regs, error_code & 0xff, 0); | 438 | do_exception(regs, error_code & 0xff, 0); |
446 | } | 439 | } |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index bb72e0a5b0e0..ac6d4d3218b3 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -2299,9 +2299,8 @@ int dasd_generic_set_offline(struct ccw_device *cdev) | |||
2299 | * in the other openers. | 2299 | * in the other openers. |
2300 | */ | 2300 | */ |
2301 | if (device->block) { | 2301 | if (device->block) { |
2302 | struct dasd_block *block = device->block; | 2302 | max_count = device->block->bdev ? 0 : -1; |
2303 | max_count = block->bdev ? 0 : -1; | 2303 | open_count = atomic_read(&device->block->open_count); |
2304 | open_count = (int) atomic_read(&block->open_count); | ||
2305 | if (open_count > max_count) { | 2304 | if (open_count > max_count) { |
2306 | if (open_count > 0) | 2305 | if (open_count > 0) |
2307 | printk(KERN_WARNING "Can't offline dasd " | 2306 | printk(KERN_WARNING "Can't offline dasd " |
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c index 3a40bee9d358..2d8df0b30538 100644 --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c | |||
@@ -745,6 +745,19 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu) | |||
745 | spin_unlock_irqrestore(&lcu->lock, flags); | 745 | spin_unlock_irqrestore(&lcu->lock, flags); |
746 | } | 746 | } |
747 | 747 | ||
748 | static void __stop_device_on_lcu(struct dasd_device *device, | ||
749 | struct dasd_device *pos) | ||
750 | { | ||
751 | /* If pos == device then device is already locked! */ | ||
752 | if (pos == device) { | ||
753 | pos->stopped |= DASD_STOPPED_SU; | ||
754 | return; | ||
755 | } | ||
756 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
757 | pos->stopped |= DASD_STOPPED_SU; | ||
758 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
759 | } | ||
760 | |||
748 | /* | 761 | /* |
749 | * This function is called in interrupt context, so the | 762 | * This function is called in interrupt context, so the |
750 | * cdev lock for device is already locked! | 763 | * cdev lock for device is already locked! |
@@ -755,35 +768,15 @@ static void _stop_all_devices_on_lcu(struct alias_lcu *lcu, | |||
755 | struct alias_pav_group *pavgroup; | 768 | struct alias_pav_group *pavgroup; |
756 | struct dasd_device *pos; | 769 | struct dasd_device *pos; |
757 | 770 | ||
758 | list_for_each_entry(pos, &lcu->active_devices, alias_list) { | 771 | list_for_each_entry(pos, &lcu->active_devices, alias_list) |
759 | if (pos != device) | 772 | __stop_device_on_lcu(device, pos); |
760 | spin_lock(get_ccwdev_lock(pos->cdev)); | 773 | list_for_each_entry(pos, &lcu->inactive_devices, alias_list) |
761 | pos->stopped |= DASD_STOPPED_SU; | 774 | __stop_device_on_lcu(device, pos); |
762 | if (pos != device) | ||
763 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
764 | } | ||
765 | list_for_each_entry(pos, &lcu->inactive_devices, alias_list) { | ||
766 | if (pos != device) | ||
767 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
768 | pos->stopped |= DASD_STOPPED_SU; | ||
769 | if (pos != device) | ||
770 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
771 | } | ||
772 | list_for_each_entry(pavgroup, &lcu->grouplist, group) { | 775 | list_for_each_entry(pavgroup, &lcu->grouplist, group) { |
773 | list_for_each_entry(pos, &pavgroup->baselist, alias_list) { | 776 | list_for_each_entry(pos, &pavgroup->baselist, alias_list) |
774 | if (pos != device) | 777 | __stop_device_on_lcu(device, pos); |
775 | spin_lock(get_ccwdev_lock(pos->cdev)); | 778 | list_for_each_entry(pos, &pavgroup->aliaslist, alias_list) |
776 | pos->stopped |= DASD_STOPPED_SU; | 779 | __stop_device_on_lcu(device, pos); |
777 | if (pos != device) | ||
778 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
779 | } | ||
780 | list_for_each_entry(pos, &pavgroup->aliaslist, alias_list) { | ||
781 | if (pos != device) | ||
782 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
783 | pos->stopped |= DASD_STOPPED_SU; | ||
784 | if (pos != device) | ||
785 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
786 | } | ||
787 | } | 780 | } |
788 | } | 781 | } |
789 | 782 | ||
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 41db3cc653f5..23ffcc4768a7 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -670,10 +670,14 @@ do_IRQ (struct pt_regs *regs) | |||
670 | continue; | 670 | continue; |
671 | } | 671 | } |
672 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; | 672 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; |
673 | if (sch) | 673 | if (!sch) { |
674 | spin_lock(sch->lock); | 674 | /* Clear pending interrupt condition. */ |
675 | tsch(tpi_info->schid, irb); | ||
676 | continue; | ||
677 | } | ||
678 | spin_lock(sch->lock); | ||
675 | /* Store interrupt response block to lowcore. */ | 679 | /* Store interrupt response block to lowcore. */ |
676 | if (tsch (tpi_info->schid, irb) == 0 && sch) { | 680 | if (tsch(tpi_info->schid, irb) == 0) { |
677 | /* Keep subchannel information word up to date. */ | 681 | /* Keep subchannel information word up to date. */ |
678 | memcpy (&sch->schib.scsw, &irb->scsw, | 682 | memcpy (&sch->schib.scsw, &irb->scsw, |
679 | sizeof (irb->scsw)); | 683 | sizeof (irb->scsw)); |
@@ -681,8 +685,7 @@ do_IRQ (struct pt_regs *regs) | |||
681 | if (sch->driver && sch->driver->irq) | 685 | if (sch->driver && sch->driver->irq) |
682 | sch->driver->irq(sch); | 686 | sch->driver->irq(sch); |
683 | } | 687 | } |
684 | if (sch) | 688 | spin_unlock(sch->lock); |
685 | spin_unlock(sch->lock); | ||
686 | /* | 689 | /* |
687 | * Are more interrupts pending? | 690 | * Are more interrupts pending? |
688 | * If so, the tpi instruction will update the lowcore | 691 | * If so, the tpi instruction will update the lowcore |
@@ -708,8 +711,9 @@ void *cio_get_console_priv(void) | |||
708 | /* | 711 | /* |
709 | * busy wait for the next interrupt on the console | 712 | * busy wait for the next interrupt on the console |
710 | */ | 713 | */ |
711 | void | 714 | void wait_cons_dev(void) |
712 | wait_cons_dev (void) | 715 | __releases(console_subchannel.lock) |
716 | __acquires(console_subchannel.lock) | ||
713 | { | 717 | { |
714 | unsigned long cr6 __attribute__ ((aligned (8))); | 718 | unsigned long cr6 __attribute__ ((aligned (8))); |
715 | unsigned long save_cr6 __attribute__ ((aligned (8))); | 719 | unsigned long save_cr6 __attribute__ ((aligned (8))); |
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 52afa4c784de..08f2235c5a6f 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h | |||
@@ -100,6 +100,7 @@ extern int cio_modify (struct subchannel *); | |||
100 | 100 | ||
101 | int cio_create_sch_lock(struct subchannel *); | 101 | int cio_create_sch_lock(struct subchannel *); |
102 | void do_adapter_IO(void); | 102 | void do_adapter_IO(void); |
103 | void do_IRQ(struct pt_regs *); | ||
103 | 104 | ||
104 | /* Use with care. */ | 105 | /* Use with care. */ |
105 | #ifdef CONFIG_CCW_CONSOLE | 106 | #ifdef CONFIG_CCW_CONSOLE |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index fec004f62bcf..e0c7adb8958e 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -577,7 +577,6 @@ static DEVICE_ATTR(devtype, 0444, devtype_show, NULL); | |||
577 | static DEVICE_ATTR(cutype, 0444, cutype_show, NULL); | 577 | static DEVICE_ATTR(cutype, 0444, cutype_show, NULL); |
578 | static DEVICE_ATTR(modalias, 0444, modalias_show, NULL); | 578 | static DEVICE_ATTR(modalias, 0444, modalias_show, NULL); |
579 | static DEVICE_ATTR(online, 0644, online_show, online_store); | 579 | static DEVICE_ATTR(online, 0644, online_show, online_store); |
580 | extern struct device_attribute dev_attr_cmb_enable; | ||
581 | static DEVICE_ATTR(availability, 0444, available_show, NULL); | 580 | static DEVICE_ATTR(availability, 0444, available_show, NULL); |
582 | 581 | ||
583 | static struct attribute * subch_attrs[] = { | 582 | static struct attribute * subch_attrs[] = { |
diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h index d40a2ffaa000..cb08092be39f 100644 --- a/drivers/s390/cio/device.h +++ b/drivers/s390/cio/device.h | |||
@@ -127,4 +127,5 @@ extern struct bus_type ccw_bus_type; | |||
127 | void retry_set_schib(struct ccw_device *cdev); | 127 | void retry_set_schib(struct ccw_device *cdev); |
128 | void cmf_retry_copy_block(struct ccw_device *); | 128 | void cmf_retry_copy_block(struct ccw_device *); |
129 | int cmf_reenable(struct ccw_device *); | 129 | int cmf_reenable(struct ccw_device *); |
130 | extern struct device_attribute dev_attr_cmb_enable; | ||
130 | #endif | 131 | #endif |
diff --git a/drivers/s390/s390mach.h b/drivers/s390/s390mach.h index d3ca4281a494..ca681f9b67fc 100644 --- a/drivers/s390/s390mach.h +++ b/drivers/s390/s390mach.h | |||
@@ -105,4 +105,8 @@ static inline int stcrw(struct crw *pcrw ) | |||
105 | #define ED_ETR_SYNC 12 /* External damage ETR sync check */ | 105 | #define ED_ETR_SYNC 12 /* External damage ETR sync check */ |
106 | #define ED_ETR_SWITCH 13 /* External damage ETR switch to local */ | 106 | #define ED_ETR_SWITCH 13 /* External damage ETR switch to local */ |
107 | 107 | ||
108 | struct pt_regs; | ||
109 | |||
110 | void s390_handle_mcck(void); | ||
111 | void s390_do_machine_check(struct pt_regs *regs); | ||
108 | #endif /* __s390mach */ | 112 | #endif /* __s390mach */ |
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index 123b557c3ff4..0818ecd30ca6 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h | |||
@@ -397,6 +397,10 @@ struct cio_iplinfo { | |||
397 | 397 | ||
398 | extern int cio_get_iplinfo(struct cio_iplinfo *iplinfo); | 398 | extern int cio_get_iplinfo(struct cio_iplinfo *iplinfo); |
399 | 399 | ||
400 | /* Function from drivers/s390/cio/chsc.c */ | ||
401 | int chsc_sstpc(void *page, unsigned int op, u16 ctrl); | ||
402 | int chsc_sstpi(void *page, void *result, size_t size); | ||
403 | |||
400 | #endif | 404 | #endif |
401 | 405 | ||
402 | #endif | 406 | #endif |
diff --git a/include/asm-s390/timex.h b/include/asm-s390/timex.h index 6dd7eecbb8e4..d744c3d62de5 100644 --- a/include/asm-s390/timex.h +++ b/include/asm-s390/timex.h | |||
@@ -83,5 +83,6 @@ static inline cycles_t get_cycles(void) | |||
83 | 83 | ||
84 | int get_sync_clock(unsigned long long *clock); | 84 | int get_sync_clock(unsigned long long *clock); |
85 | void init_cpu_timer(void); | 85 | void init_cpu_timer(void); |
86 | unsigned long long monotonic_clock(void); | ||
86 | 87 | ||
87 | #endif | 88 | #endif |
diff --git a/include/asm-s390/tlbflush.h b/include/asm-s390/tlbflush.h index de723470c5d4..9e57a93d7de1 100644 --- a/include/asm-s390/tlbflush.h +++ b/include/asm-s390/tlbflush.h | |||
@@ -17,9 +17,10 @@ static inline void __tlb_flush_local(void) | |||
17 | /* | 17 | /* |
18 | * Flush all tlb entries on all cpus. | 18 | * Flush all tlb entries on all cpus. |
19 | */ | 19 | */ |
20 | void smp_ptlb_all(void); | ||
21 | |||
20 | static inline void __tlb_flush_global(void) | 22 | static inline void __tlb_flush_global(void) |
21 | { | 23 | { |
22 | extern void smp_ptlb_all(void); | ||
23 | register unsigned long reg2 asm("2"); | 24 | register unsigned long reg2 asm("2"); |
24 | register unsigned long reg3 asm("3"); | 25 | register unsigned long reg3 asm("3"); |
25 | register unsigned long reg4 asm("4"); | 26 | register unsigned long reg4 asm("4"); |