aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/Makefile4
-rw-r--r--arch/s390/kernel/compat_linux.c19
-rw-r--r--arch/s390/kernel/head31.S4
-rw-r--r--arch/s390/kernel/head64.S4
-rw-r--r--arch/s390/kernel/machine_kexec.c1
-rw-r--r--arch/s390/kernel/module.c2
-rw-r--r--arch/s390/kernel/process.c2
-rw-r--r--arch/s390/kernel/profile.c2
-rw-r--r--arch/s390/kernel/s390_ext.c2
-rw-r--r--arch/s390/kernel/setup.c46
-rw-r--r--arch/s390/kernel/time.c2
-rw-r--r--arch/s390/kernel/traps.c18
12 files changed, 69 insertions, 37 deletions
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index eabf00a6f770..86601a945709 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -17,8 +17,8 @@ obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
17obj-$(CONFIG_SMP) += smp.o 17obj-$(CONFIG_SMP) += smp.o
18 18
19obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ 19obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \
20 compat_wrapper.o compat_exec_domain.o 20 compat_wrapper.o compat_exec_domain.o \
21obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o 21 binfmt_elf32.o
22 22
23obj-$(CONFIG_VIRT_TIMER) += vtime.o 23obj-$(CONFIG_VIRT_TIMER) += vtime.o
24obj-$(CONFIG_STACKTRACE) += stacktrace.o 24obj-$(CONFIG_STACKTRACE) += stacktrace.o
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index cabb4ff54cd7..785c9f70ac98 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -409,7 +409,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
409 mm_segment_t old_fs = get_fs (); 409 mm_segment_t old_fs = get_fs ();
410 410
411 set_fs (KERNEL_DS); 411 set_fs (KERNEL_DS);
412 ret = sys_sysinfo(&s); 412 ret = sys_sysinfo((struct sysinfo __user *) &s);
413 set_fs (old_fs); 413 set_fs (old_fs);
414 err = put_user (s.uptime, &info->uptime); 414 err = put_user (s.uptime, &info->uptime);
415 err |= __put_user (s.loads[0], &info->loads[0]); 415 err |= __put_user (s.loads[0], &info->loads[0]);
@@ -438,7 +438,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
438 mm_segment_t old_fs = get_fs (); 438 mm_segment_t old_fs = get_fs ();
439 439
440 set_fs (KERNEL_DS); 440 set_fs (KERNEL_DS);
441 ret = sys_sched_rr_get_interval(pid, &t); 441 ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t);
442 set_fs (old_fs); 442 set_fs (old_fs);
443 if (put_compat_timespec(&t, interval)) 443 if (put_compat_timespec(&t, interval))
444 return -EFAULT; 444 return -EFAULT;
@@ -464,7 +464,10 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
464 } 464 }
465 } 465 }
466 set_fs (KERNEL_DS); 466 set_fs (KERNEL_DS);
467 ret = sys_rt_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL, sigsetsize); 467 ret = sys_rt_sigprocmask(how,
468 set ? (sigset_t __user *) &s : NULL,
469 oset ? (sigset_t __user *) &s : NULL,
470 sigsetsize);
468 set_fs (old_fs); 471 set_fs (old_fs);
469 if (ret) return ret; 472 if (ret) return ret;
470 if (oset) { 473 if (oset) {
@@ -489,7 +492,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
489 mm_segment_t old_fs = get_fs(); 492 mm_segment_t old_fs = get_fs();
490 493
491 set_fs (KERNEL_DS); 494 set_fs (KERNEL_DS);
492 ret = sys_rt_sigpending(&s, sigsetsize); 495 ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize);
493 set_fs (old_fs); 496 set_fs (old_fs);
494 if (!ret) { 497 if (!ret) {
495 switch (_NSIG_WORDS) { 498 switch (_NSIG_WORDS) {
@@ -514,7 +517,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
514 if (copy_siginfo_from_user32(&info, uinfo)) 517 if (copy_siginfo_from_user32(&info, uinfo))
515 return -EFAULT; 518 return -EFAULT;
516 set_fs (KERNEL_DS); 519 set_fs (KERNEL_DS);
517 ret = sys_rt_sigqueueinfo(pid, sig, &info); 520 ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info);
518 set_fs (old_fs); 521 set_fs (old_fs);
519 return ret; 522 return ret;
520} 523}
@@ -674,7 +677,8 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse
674 return -EFAULT; 677 return -EFAULT;
675 678
676 set_fs(KERNEL_DS); 679 set_fs(KERNEL_DS);
677 ret = sys_sendfile(out_fd, in_fd, offset ? &of : NULL, count); 680 ret = sys_sendfile(out_fd, in_fd,
681 offset ? (off_t __user *) &of : NULL, count);
678 set_fs(old_fs); 682 set_fs(old_fs);
679 683
680 if (offset && put_user(of, offset)) 684 if (offset && put_user(of, offset))
@@ -694,7 +698,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
694 return -EFAULT; 698 return -EFAULT;
695 699
696 set_fs(KERNEL_DS); 700 set_fs(KERNEL_DS);
697 ret = sys_sendfile64(out_fd, in_fd, offset ? &lof : NULL, count); 701 ret = sys_sendfile64(out_fd, in_fd,
702 offset ? (loff_t __user *) &lof : NULL, count);
698 set_fs(old_fs); 703 set_fs(old_fs);
699 704
700 if (offset && put_user(lof, offset)) 705 if (offset && put_user(lof, offset))
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S
index d00de17b3778..a4dc61f3285e 100644
--- a/arch/s390/kernel/head31.S
+++ b/arch/s390/kernel/head31.S
@@ -273,7 +273,7 @@ startup_continue:
273.Lbss_end: .long _end 273.Lbss_end: .long _end
274.Lparmaddr: .long PARMAREA 274.Lparmaddr: .long PARMAREA
275.Lsccbaddr: .long .Lsccb 275.Lsccbaddr: .long .Lsccb
276 .align 4096 276 .org 0x12000
277.Lsccb: 277.Lsccb:
278 .hword 0x1000 # length, one page 278 .hword 0x1000 # length, one page
279 .byte 0x00,0x00,0x00 279 .byte 0x00,0x00,0x00
@@ -290,7 +290,7 @@ startup_continue:
290.Lscpincr2: 290.Lscpincr2:
291 .quad 0x00 291 .quad 0x00
292 .fill 3984,1,0 292 .fill 3984,1,0
293 .align 4096 293 .org 0x13000
294 294
295#ifdef CONFIG_SHARED_KERNEL 295#ifdef CONFIG_SHARED_KERNEL
296 .org 0x100000 296 .org 0x100000
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 47744fcca930..9d80c5b1ef95 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -268,7 +268,7 @@ startup_continue:
268.Lparmaddr: 268.Lparmaddr:
269 .quad PARMAREA 269 .quad PARMAREA
270 270
271 .align 4096 271 .org 0x12000
272.Lsccb: 272.Lsccb:
273 .hword 0x1000 # length, one page 273 .hword 0x1000 # length, one page
274 .byte 0x00,0x00,0x00 274 .byte 0x00,0x00,0x00
@@ -285,7 +285,7 @@ startup_continue:
285.Lscpincr2: 285.Lscpincr2:
286 .quad 0x00 286 .quad 0x00
287 .fill 3984,1,0 287 .fill 3984,1,0
288 .align 4096 288 .org 0x13000
289 289
290#ifdef CONFIG_SHARED_KERNEL 290#ifdef CONFIG_SHARED_KERNEL
291 .org 0x100000 291 .org 0x100000
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index fbde6a915264..60b1ea9f946b 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -63,6 +63,7 @@ NORET_TYPE void
63machine_kexec(struct kimage *image) 63machine_kexec(struct kimage *image)
64{ 64{
65 clear_all_subchannels(); 65 clear_all_subchannels();
66 cio_reset_channel_paths();
66 67
67 /* Disable lowcore protection */ 68 /* Disable lowcore protection */
68 ctl_clear_bit(0,28); 69 ctl_clear_bit(0,28);
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
index c271cdab58e2..d989ed45a7aa 100644
--- a/arch/s390/kernel/module.c
+++ b/arch/s390/kernel/module.c
@@ -119,7 +119,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
119 int nrela, i, j; 119 int nrela, i, j;
120 120
121 /* Find symbol table and string table. */ 121 /* Find symbol table and string table. */
122 symtab = 0; 122 symtab = NULL;
123 for (i = 0; i < hdr->e_shnum; i++) 123 for (i = 0; i < hdr->e_shnum; i++)
124 switch (sechdrs[i].sh_type) { 124 switch (sechdrs[i].sh_type) {
125 case SHT_SYMTAB: 125 case SHT_SYMTAB:
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 78c8e5548caf..d3cbfa3005ec 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -172,7 +172,7 @@ void show_regs(struct pt_regs *regs)
172 show_registers(regs); 172 show_registers(regs);
173 /* Show stack backtrace if pt_regs is from kernel mode */ 173 /* Show stack backtrace if pt_regs is from kernel mode */
174 if (!(regs->psw.mask & PSW_MASK_PSTATE)) 174 if (!(regs->psw.mask & PSW_MASK_PSTATE))
175 show_trace(0,(unsigned long *) regs->gprs[15]); 175 show_trace(NULL, (unsigned long *) regs->gprs[15]);
176} 176}
177 177
178extern void kernel_thread_starter(void); 178extern void kernel_thread_starter(void);
diff --git a/arch/s390/kernel/profile.c b/arch/s390/kernel/profile.c
index 7ba777eec1a8..b81aa1f569ca 100644
--- a/arch/s390/kernel/profile.c
+++ b/arch/s390/kernel/profile.c
@@ -13,7 +13,7 @@ static struct proc_dir_entry * root_irq_dir;
13void init_irq_proc(void) 13void init_irq_proc(void)
14{ 14{
15 /* create /proc/irq */ 15 /* create /proc/irq */
16 root_irq_dir = proc_mkdir("irq", 0); 16 root_irq_dir = proc_mkdir("irq", NULL);
17 17
18 /* create /proc/irq/prof_cpu_mask */ 18 /* create /proc/irq/prof_cpu_mask */
19 create_prof_cpu_mask(root_irq_dir); 19 create_prof_cpu_mask(root_irq_dir);
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c
index 207bc511a6e3..c1b383537fec 100644
--- a/arch/s390/kernel/s390_ext.c
+++ b/arch/s390/kernel/s390_ext.c
@@ -24,7 +24,7 @@
24 * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000 24 * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000
25 * iucv and 0x2603 pfault) this is always the first element. 25 * iucv and 0x2603 pfault) this is always the first element.
26 */ 26 */
27ext_int_info_t *ext_int_hash[256] = { 0, }; 27ext_int_info_t *ext_int_hash[256] = { NULL, };
28 28
29static inline int ext_hash(__u16 code) 29static inline int ext_hash(__u16 code)
30{ 30{
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 1ca34f54ea8a..c902f059c7aa 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -877,31 +877,57 @@ static struct bin_attribute ipl_scp_data_attr = {
877 877
878static decl_subsys(ipl, NULL, NULL); 878static decl_subsys(ipl, NULL, NULL);
879 879
880static int ipl_register_fcp_files(void)
881{
882 int rc;
883
884 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
885 &ipl_fcp_attr_group);
886 if (rc)
887 goto out;
888 rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
889 &ipl_parameter_attr);
890 if (rc)
891 goto out_ipl_parm;
892 rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
893 &ipl_scp_data_attr);
894 if (!rc)
895 goto out;
896
897 sysfs_remove_bin_file(&ipl_subsys.kset.kobj, &ipl_parameter_attr);
898
899out_ipl_parm:
900 sysfs_remove_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group);
901out:
902 return rc;
903}
904
880static int __init 905static int __init
881ipl_device_sysfs_register(void) { 906ipl_device_sysfs_register(void) {
882 int rc; 907 int rc;
883 908
884 rc = firmware_register(&ipl_subsys); 909 rc = firmware_register(&ipl_subsys);
885 if (rc) 910 if (rc)
886 return rc; 911 goto out;
887 912
888 switch (get_ipl_type()) { 913 switch (get_ipl_type()) {
889 case ipl_type_ccw: 914 case ipl_type_ccw:
890 sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_ccw_attr_group); 915 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
916 &ipl_ccw_attr_group);
891 break; 917 break;
892 case ipl_type_fcp: 918 case ipl_type_fcp:
893 sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group); 919 rc = ipl_register_fcp_files();
894 sysfs_create_bin_file(&ipl_subsys.kset.kobj,
895 &ipl_parameter_attr);
896 sysfs_create_bin_file(&ipl_subsys.kset.kobj,
897 &ipl_scp_data_attr);
898 break; 920 break;
899 default: 921 default:
900 sysfs_create_group(&ipl_subsys.kset.kobj, 922 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
901 &ipl_unknown_attr_group); 923 &ipl_unknown_attr_group);
902 break; 924 break;
903 } 925 }
904 return 0; 926
927 if (rc)
928 firmware_unregister(&ipl_subsys);
929out:
930 return rc;
905} 931}
906 932
907__initcall(ipl_device_sysfs_register); 933__initcall(ipl_device_sysfs_register);
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index f7fe9bc43397..74e6178fbaf2 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -379,7 +379,7 @@ void __init time_init(void)
379 -xtime.tv_sec, -xtime.tv_nsec); 379 -xtime.tv_sec, -xtime.tv_nsec);
380 380
381 /* request the clock comparator external interrupt */ 381 /* request the clock comparator external interrupt */
382 if (register_early_external_interrupt(0x1004, 0, 382 if (register_early_external_interrupt(0x1004, NULL,
383 &ext_int_info_cc) != 0) 383 &ext_int_info_cc) != 0)
384 panic("Couldn't request external interrupt 0x1004"); 384 panic("Couldn't request external interrupt 0x1004");
385 385
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 12240c03a6dd..bde1d1d59858 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -170,7 +170,7 @@ void show_stack(struct task_struct *task, unsigned long *sp)
170 */ 170 */
171void dump_stack(void) 171void dump_stack(void)
172{ 172{
173 show_stack(0, 0); 173 show_stack(NULL, NULL);
174} 174}
175 175
176EXPORT_SYMBOL(dump_stack); 176EXPORT_SYMBOL(dump_stack);
@@ -331,9 +331,9 @@ static void inline do_trap(long interruption_code, int signr, char *str,
331 } 331 }
332} 332}
333 333
334static inline void *get_check_address(struct pt_regs *regs) 334static inline void __user *get_check_address(struct pt_regs *regs)
335{ 335{
336 return (void *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN); 336 return (void __user *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN);
337} 337}
338 338
339void do_single_step(struct pt_regs *regs) 339void do_single_step(struct pt_regs *regs)
@@ -360,7 +360,7 @@ asmlinkage void name(struct pt_regs * regs, long interruption_code) \
360 info.si_signo = signr; \ 360 info.si_signo = signr; \
361 info.si_errno = 0; \ 361 info.si_errno = 0; \
362 info.si_code = sicode; \ 362 info.si_code = sicode; \
363 info.si_addr = (void *)siaddr; \ 363 info.si_addr = siaddr; \
364 do_trap(interruption_code, signr, str, regs, &info); \ 364 do_trap(interruption_code, signr, str, regs, &info); \
365} 365}
366 366
@@ -392,7 +392,7 @@ DO_ERROR_INFO(SIGILL, "translation exception", translation_exception,
392 ILL_ILLOPN, get_check_address(regs)) 392 ILL_ILLOPN, get_check_address(regs))
393 393
394static inline void 394static inline void
395do_fp_trap(struct pt_regs *regs, void *location, 395do_fp_trap(struct pt_regs *regs, void __user *location,
396 int fpc, long interruption_code) 396 int fpc, long interruption_code)
397{ 397{
398 siginfo_t si; 398 siginfo_t si;
@@ -424,10 +424,10 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
424{ 424{
425 siginfo_t info; 425 siginfo_t info;
426 __u8 opcode[6]; 426 __u8 opcode[6];
427 __u16 *location; 427 __u16 __user *location;
428 int signal = 0; 428 int signal = 0;
429 429
430 location = (__u16 *) get_check_address(regs); 430 location = get_check_address(regs);
431 431
432 /* 432 /*
433 * We got all needed information from the lowcore and can 433 * We got all needed information from the lowcore and can
@@ -559,10 +559,10 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception,
559 559
560asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) 560asmlinkage void data_exception(struct pt_regs * regs, long interruption_code)
561{ 561{
562 __u16 *location; 562 __u16 __user *location;
563 int signal = 0; 563 int signal = 0;
564 564
565 location = (__u16 *) get_check_address(regs); 565 location = get_check_address(regs);
566 566
567 /* 567 /*
568 * We got all needed information from the lowcore and can 568 * We got all needed information from the lowcore and can