diff options
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 59 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.h | 6 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 6 | ||||
-rw-r--r-- | arch/s390/kernel/debug.c | 13 | ||||
-rw-r--r-- | arch/s390/kernel/head64.S | 3 | ||||
-rw-r--r-- | arch/s390/kernel/s390_ext.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 36 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/vdso.c | 9 | ||||
-rw-r--r-- | arch/s390/kernel/vtime.c | 2 |
11 files changed, 43 insertions, 101 deletions
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index c7be8e10b87e..683f6381cc59 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
@@ -44,6 +44,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o | |||
44 | obj-$(CONFIG_FUNCTION_TRACER) += $(if $(CONFIG_64BIT),mcount64.o,mcount.o) | 44 | obj-$(CONFIG_FUNCTION_TRACER) += $(if $(CONFIG_64BIT),mcount64.o,mcount.o) |
45 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o | 45 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
46 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o | 46 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
47 | obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o | ||
47 | 48 | ||
48 | # Kexec part | 49 | # Kexec part |
49 | S390_KEXEC_OBJS := machine_kexec.o crash.o | 50 | S390_KEXEC_OBJS := machine_kexec.o crash.o |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 0debcec23a39..25c31d681402 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -31,14 +31,8 @@ | |||
31 | #include <linux/shm.h> | 31 | #include <linux/shm.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/uio.h> | 33 | #include <linux/uio.h> |
34 | #include <linux/nfs_fs.h> | ||
35 | #include <linux/quota.h> | 34 | #include <linux/quota.h> |
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/sunrpc/svc.h> | ||
38 | #include <linux/nfsd/nfsd.h> | ||
39 | #include <linux/nfsd/cache.h> | ||
40 | #include <linux/nfsd/xdr.h> | ||
41 | #include <linux/nfsd/syscall.h> | ||
42 | #include <linux/poll.h> | 36 | #include <linux/poll.h> |
43 | #include <linux/personality.h> | 37 | #include <linux/personality.h> |
44 | #include <linux/stat.h> | 38 | #include <linux/stat.h> |
@@ -527,59 +521,6 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd, | |||
527 | return ret; | 521 | return ret; |
528 | } | 522 | } |
529 | 523 | ||
530 | #ifdef CONFIG_SYSCTL_SYSCALL | ||
531 | struct __sysctl_args32 { | ||
532 | u32 name; | ||
533 | int nlen; | ||
534 | u32 oldval; | ||
535 | u32 oldlenp; | ||
536 | u32 newval; | ||
537 | u32 newlen; | ||
538 | u32 __unused[4]; | ||
539 | }; | ||
540 | |||
541 | asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | ||
542 | { | ||
543 | struct __sysctl_args32 tmp; | ||
544 | int error; | ||
545 | size_t oldlen; | ||
546 | size_t __user *oldlenp = NULL; | ||
547 | unsigned long addr = (((unsigned long)&args->__unused[0]) + 7) & ~7; | ||
548 | |||
549 | if (copy_from_user(&tmp, args, sizeof(tmp))) | ||
550 | return -EFAULT; | ||
551 | |||
552 | if (tmp.oldval && tmp.oldlenp) { | ||
553 | /* Duh, this is ugly and might not work if sysctl_args | ||
554 | is in read-only memory, but do_sysctl does indirectly | ||
555 | a lot of uaccess in both directions and we'd have to | ||
556 | basically copy the whole sysctl.c here, and | ||
557 | glibc's __sysctl uses rw memory for the structure | ||
558 | anyway. */ | ||
559 | if (get_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp)) || | ||
560 | put_user(oldlen, (size_t __user *)addr)) | ||
561 | return -EFAULT; | ||
562 | oldlenp = (size_t __user *)addr; | ||
563 | } | ||
564 | |||
565 | lock_kernel(); | ||
566 | error = do_sysctl(compat_ptr(tmp.name), tmp.nlen, compat_ptr(tmp.oldval), | ||
567 | oldlenp, compat_ptr(tmp.newval), tmp.newlen); | ||
568 | unlock_kernel(); | ||
569 | if (oldlenp) { | ||
570 | if (!error) { | ||
571 | if (get_user(oldlen, (size_t __user *)addr) || | ||
572 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) | ||
573 | error = -EFAULT; | ||
574 | } | ||
575 | if (copy_to_user(args->__unused, tmp.__unused, | ||
576 | sizeof(tmp.__unused))) | ||
577 | error = -EFAULT; | ||
578 | } | ||
579 | return error; | ||
580 | } | ||
581 | #endif | ||
582 | |||
583 | struct stat64_emu31 { | 524 | struct stat64_emu31 { |
584 | unsigned long long st_dev; | 525 | unsigned long long st_dev; |
585 | unsigned int __pad1; | 526 | unsigned int __pad1; |
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index c07f9ca05ade..cb97afc85c94 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h | |||
@@ -4,10 +4,6 @@ | |||
4 | #include <linux/compat.h> | 4 | #include <linux/compat.h> |
5 | #include <linux/socket.h> | 5 | #include <linux/socket.h> |
6 | #include <linux/syscalls.h> | 6 | #include <linux/syscalls.h> |
7 | #include <linux/nfs_fs.h> | ||
8 | #include <linux/sunrpc/svc.h> | ||
9 | #include <linux/nfsd/nfsd.h> | ||
10 | #include <linux/nfsd/export.h> | ||
11 | 7 | ||
12 | /* Macro that masks the high order bit of an 32 bit pointer and converts it*/ | 8 | /* Macro that masks the high order bit of an 32 bit pointer and converts it*/ |
13 | /* to a 64 bit pointer */ | 9 | /* to a 64 bit pointer */ |
@@ -162,7 +158,6 @@ struct ucontext32 { | |||
162 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | 158 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
163 | }; | 159 | }; |
164 | 160 | ||
165 | struct __sysctl_args32; | ||
166 | struct stat64_emu31; | 161 | struct stat64_emu31; |
167 | struct mmap_arg_struct_emu31; | 162 | struct mmap_arg_struct_emu31; |
168 | struct fadvise64_64_args; | 163 | struct fadvise64_64_args; |
@@ -212,7 +207,6 @@ long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, | |||
212 | size_t count); | 207 | size_t count); |
213 | long sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, | 208 | long sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, |
214 | s32 count); | 209 | s32 count); |
215 | long sys32_sysctl(struct __sysctl_args32 __user *args); | ||
216 | long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf); | 210 | long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf); |
217 | long sys32_lstat64(char __user * filename, | 211 | long sys32_lstat64(char __user * filename, |
218 | struct stat64_emu31 __user * statbuf); | 212 | struct stat64_emu31 __user * statbuf); |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index cbd9901dc0f8..30de2d0e52bb 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -689,8 +689,6 @@ sys32_fdatasync_wrapper: | |||
689 | llgfr %r2,%r2 # unsigned int | 689 | llgfr %r2,%r2 # unsigned int |
690 | jg sys_fdatasync # branch to system call | 690 | jg sys_fdatasync # branch to system call |
691 | 691 | ||
692 | #sys32_sysctl_wrapper # tbd | ||
693 | |||
694 | .globl sys32_mlock_wrapper | 692 | .globl sys32_mlock_wrapper |
695 | sys32_mlock_wrapper: | 693 | sys32_mlock_wrapper: |
696 | llgfr %r2,%r2 # unsigned long | 694 | llgfr %r2,%r2 # unsigned long |
@@ -1087,8 +1085,8 @@ sys32_stime_wrapper: | |||
1087 | 1085 | ||
1088 | .globl sys32_sysctl_wrapper | 1086 | .globl sys32_sysctl_wrapper |
1089 | sys32_sysctl_wrapper: | 1087 | sys32_sysctl_wrapper: |
1090 | llgtr %r2,%r2 # struct __sysctl_args32 * | 1088 | llgtr %r2,%r2 # struct compat_sysctl_args * |
1091 | jg sys32_sysctl | 1089 | jg compat_sys_sysctl |
1092 | 1090 | ||
1093 | .globl sys32_fstat64_wrapper | 1091 | .globl sys32_fstat64_wrapper |
1094 | sys32_fstat64_wrapper: | 1092 | sys32_fstat64_wrapper: |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 20f282c911c2..071c81f179ef 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -893,35 +893,30 @@ s390dbf_procactive(ctl_table *table, int write, | |||
893 | 893 | ||
894 | static struct ctl_table s390dbf_table[] = { | 894 | static struct ctl_table s390dbf_table[] = { |
895 | { | 895 | { |
896 | .ctl_name = CTL_S390DBF_STOPPABLE, | ||
897 | .procname = "debug_stoppable", | 896 | .procname = "debug_stoppable", |
898 | .data = &debug_stoppable, | 897 | .data = &debug_stoppable, |
899 | .maxlen = sizeof(int), | 898 | .maxlen = sizeof(int), |
900 | .mode = S_IRUGO | S_IWUSR, | 899 | .mode = S_IRUGO | S_IWUSR, |
901 | .proc_handler = &proc_dointvec, | 900 | .proc_handler = proc_dointvec, |
902 | .strategy = &sysctl_intvec, | ||
903 | }, | 901 | }, |
904 | { | 902 | { |
905 | .ctl_name = CTL_S390DBF_ACTIVE, | ||
906 | .procname = "debug_active", | 903 | .procname = "debug_active", |
907 | .data = &debug_active, | 904 | .data = &debug_active, |
908 | .maxlen = sizeof(int), | 905 | .maxlen = sizeof(int), |
909 | .mode = S_IRUGO | S_IWUSR, | 906 | .mode = S_IRUGO | S_IWUSR, |
910 | .proc_handler = &s390dbf_procactive, | 907 | .proc_handler = s390dbf_procactive, |
911 | .strategy = &sysctl_intvec, | ||
912 | }, | 908 | }, |
913 | { .ctl_name = 0 } | 909 | { } |
914 | }; | 910 | }; |
915 | 911 | ||
916 | static struct ctl_table s390dbf_dir_table[] = { | 912 | static struct ctl_table s390dbf_dir_table[] = { |
917 | { | 913 | { |
918 | .ctl_name = CTL_S390DBF, | ||
919 | .procname = "s390dbf", | 914 | .procname = "s390dbf", |
920 | .maxlen = 0, | 915 | .maxlen = 0, |
921 | .mode = S_IRUGO | S_IXUGO, | 916 | .mode = S_IRUGO | S_IXUGO, |
922 | .child = s390dbf_table, | 917 | .child = s390dbf_table, |
923 | }, | 918 | }, |
924 | { .ctl_name = 0 } | 919 | { } |
925 | }; | 920 | }; |
926 | 921 | ||
927 | static struct ctl_table_header *s390dbf_sysctl_header; | 922 | static struct ctl_table_header *s390dbf_sysctl_header; |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 6a250808092b..d984a2a380c3 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -83,6 +83,8 @@ startup_continue: | |||
83 | slr %r0,%r0 # set cpuid to zero | 83 | slr %r0,%r0 # set cpuid to zero |
84 | sigp %r1,%r0,0x12 # switch to esame mode | 84 | sigp %r1,%r0,0x12 # switch to esame mode |
85 | sam64 # switch to 64 bit mode | 85 | sam64 # switch to 64 bit mode |
86 | llgfr %r13,%r13 # clear high-order half of base reg | ||
87 | lmh %r0,%r15,.Lzero64-.LPG1(%r13) # clear high-order half | ||
86 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers | 88 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers |
87 | lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area | 89 | lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area |
88 | # move IPL device to lowcore | 90 | # move IPL device to lowcore |
@@ -127,6 +129,7 @@ startup_continue: | |||
127 | .L4malign:.quad 0xffffffffffc00000 | 129 | .L4malign:.quad 0xffffffffffc00000 |
128 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 | 130 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 |
129 | .Lnop: .long 0x07000700 | 131 | .Lnop: .long 0x07000700 |
132 | .Lzero64:.fill 16,4,0x0 | ||
130 | #ifdef CONFIG_ZFCPDUMP | 133 | #ifdef CONFIG_ZFCPDUMP |
131 | .Lcurrent_cpu: | 134 | .Lcurrent_cpu: |
132 | .long 0x0 | 135 | .long 0x0 |
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c index 0de305b598ce..59618bcd99b7 100644 --- a/arch/s390/kernel/s390_ext.c +++ b/arch/s390/kernel/s390_ext.c | |||
@@ -126,6 +126,8 @@ void __irq_entry do_extint(struct pt_regs *regs, unsigned short code) | |||
126 | /* Serve timer interrupts first. */ | 126 | /* Serve timer interrupts first. */ |
127 | clock_comparator_work(); | 127 | clock_comparator_work(); |
128 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; | 128 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; |
129 | if (code != 0x1004) | ||
130 | __get_cpu_var(s390_idle).nohz_delay = 1; | ||
129 | index = ext_hash(code); | 131 | index = ext_hash(code); |
130 | for (p = ext_int_hash[index]; p; p = p->next) { | 132 | for (p = ext_int_hash[index]; p; p = p->next) { |
131 | if (likely(p->code == code)) | 133 | if (likely(p->code == code)) |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 061479ff029f..0663287fa1b3 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -305,9 +305,8 @@ static int __init early_parse_mem(char *p) | |||
305 | } | 305 | } |
306 | early_param("mem", early_parse_mem); | 306 | early_param("mem", early_parse_mem); |
307 | 307 | ||
308 | #ifdef CONFIG_S390_SWITCH_AMODE | 308 | unsigned int user_mode = HOME_SPACE_MODE; |
309 | unsigned int switch_amode = 0; | 309 | EXPORT_SYMBOL_GPL(user_mode); |
310 | EXPORT_SYMBOL_GPL(switch_amode); | ||
311 | 310 | ||
312 | static int set_amode_and_uaccess(unsigned long user_amode, | 311 | static int set_amode_and_uaccess(unsigned long user_amode, |
313 | unsigned long user32_amode) | 312 | unsigned long user32_amode) |
@@ -340,23 +339,29 @@ static int set_amode_and_uaccess(unsigned long user_amode, | |||
340 | */ | 339 | */ |
341 | static int __init early_parse_switch_amode(char *p) | 340 | static int __init early_parse_switch_amode(char *p) |
342 | { | 341 | { |
343 | switch_amode = 1; | 342 | if (user_mode != SECONDARY_SPACE_MODE) |
343 | user_mode = PRIMARY_SPACE_MODE; | ||
344 | return 0; | 344 | return 0; |
345 | } | 345 | } |
346 | early_param("switch_amode", early_parse_switch_amode); | 346 | early_param("switch_amode", early_parse_switch_amode); |
347 | 347 | ||
348 | #else /* CONFIG_S390_SWITCH_AMODE */ | 348 | static int __init early_parse_user_mode(char *p) |
349 | static inline int set_amode_and_uaccess(unsigned long user_amode, | ||
350 | unsigned long user32_amode) | ||
351 | { | 349 | { |
350 | if (p && strcmp(p, "primary") == 0) | ||
351 | user_mode = PRIMARY_SPACE_MODE; | ||
352 | #ifdef CONFIG_S390_EXEC_PROTECT | ||
353 | else if (p && strcmp(p, "secondary") == 0) | ||
354 | user_mode = SECONDARY_SPACE_MODE; | ||
355 | #endif | ||
356 | else if (!p || strcmp(p, "home") == 0) | ||
357 | user_mode = HOME_SPACE_MODE; | ||
358 | else | ||
359 | return 1; | ||
352 | return 0; | 360 | return 0; |
353 | } | 361 | } |
354 | #endif /* CONFIG_S390_SWITCH_AMODE */ | 362 | early_param("user_mode", early_parse_user_mode); |
355 | 363 | ||
356 | #ifdef CONFIG_S390_EXEC_PROTECT | 364 | #ifdef CONFIG_S390_EXEC_PROTECT |
357 | unsigned int s390_noexec = 0; | ||
358 | EXPORT_SYMBOL_GPL(s390_noexec); | ||
359 | |||
360 | /* | 365 | /* |
361 | * Enable execute protection? | 366 | * Enable execute protection? |
362 | */ | 367 | */ |
@@ -364,8 +369,7 @@ static int __init early_parse_noexec(char *p) | |||
364 | { | 369 | { |
365 | if (!strncmp(p, "off", 3)) | 370 | if (!strncmp(p, "off", 3)) |
366 | return 0; | 371 | return 0; |
367 | switch_amode = 1; | 372 | user_mode = SECONDARY_SPACE_MODE; |
368 | s390_noexec = 1; | ||
369 | return 0; | 373 | return 0; |
370 | } | 374 | } |
371 | early_param("noexec", early_parse_noexec); | 375 | early_param("noexec", early_parse_noexec); |
@@ -373,7 +377,7 @@ early_param("noexec", early_parse_noexec); | |||
373 | 377 | ||
374 | static void setup_addressing_mode(void) | 378 | static void setup_addressing_mode(void) |
375 | { | 379 | { |
376 | if (s390_noexec) { | 380 | if (user_mode == SECONDARY_SPACE_MODE) { |
377 | if (set_amode_and_uaccess(PSW_ASC_SECONDARY, | 381 | if (set_amode_and_uaccess(PSW_ASC_SECONDARY, |
378 | PSW32_ASC_SECONDARY)) | 382 | PSW32_ASC_SECONDARY)) |
379 | pr_info("Execute protection active, " | 383 | pr_info("Execute protection active, " |
@@ -381,7 +385,7 @@ static void setup_addressing_mode(void) | |||
381 | else | 385 | else |
382 | pr_info("Execute protection active, " | 386 | pr_info("Execute protection active, " |
383 | "mvcos not available\n"); | 387 | "mvcos not available\n"); |
384 | } else if (switch_amode) { | 388 | } else if (user_mode == PRIMARY_SPACE_MODE) { |
385 | if (set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY)) | 389 | if (set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY)) |
386 | pr_info("Address spaces switched, " | 390 | pr_info("Address spaces switched, " |
387 | "mvcos available\n"); | 391 | "mvcos available\n"); |
@@ -411,7 +415,7 @@ setup_lowcore(void) | |||
411 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; | 415 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; |
412 | lc->restart_psw.addr = | 416 | lc->restart_psw.addr = |
413 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; | 417 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; |
414 | if (switch_amode) | 418 | if (user_mode != HOME_SPACE_MODE) |
415 | lc->restart_psw.mask |= PSW_ASC_HOME; | 419 | lc->restart_psw.mask |= PSW_ASC_HOME; |
416 | lc->external_new_psw.mask = psw_kernel_bits; | 420 | lc->external_new_psw.mask = psw_kernel_bits; |
417 | lc->external_new_psw.addr = | 421 | lc->external_new_psw.addr = |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 34162a0b2caa..65065ac48ed3 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -214,7 +214,8 @@ struct clocksource * __init clocksource_default_clock(void) | |||
214 | return &clocksource_tod; | 214 | return &clocksource_tod; |
215 | } | 215 | } |
216 | 216 | ||
217 | void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) | 217 | void update_vsyscall(struct timespec *wall_time, struct clocksource *clock, |
218 | u32 mult) | ||
218 | { | 219 | { |
219 | if (clock != &clocksource_tod) | 220 | if (clock != &clocksource_tod) |
220 | return; | 221 | return; |
@@ -334,7 +335,7 @@ int get_sync_clock(unsigned long long *clock) | |||
334 | sw0 = atomic_read(sw_ptr); | 335 | sw0 = atomic_read(sw_ptr); |
335 | *clock = get_clock(); | 336 | *clock = get_clock(); |
336 | sw1 = atomic_read(sw_ptr); | 337 | sw1 = atomic_read(sw_ptr); |
337 | put_cpu_var(clock_sync_sync); | 338 | put_cpu_var(clock_sync_word); |
338 | if (sw0 == sw1 && (sw0 & 0x80000000U)) | 339 | if (sw0 == sw1 && (sw0 & 0x80000000U)) |
339 | /* Success: time is in sync. */ | 340 | /* Success: time is in sync. */ |
340 | return 0; | 341 | return 0; |
@@ -384,7 +385,7 @@ static inline int check_sync_clock(void) | |||
384 | 385 | ||
385 | sw_ptr = &get_cpu_var(clock_sync_word); | 386 | sw_ptr = &get_cpu_var(clock_sync_word); |
386 | rc = (atomic_read(sw_ptr) & 0x80000000U) != 0; | 387 | rc = (atomic_read(sw_ptr) & 0x80000000U) != 0; |
387 | put_cpu_var(clock_sync_sync); | 388 | put_cpu_var(clock_sync_word); |
388 | return rc; | 389 | return rc; |
389 | } | 390 | } |
390 | 391 | ||
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index adfb32aa6d59..5f99e66c51c3 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c | |||
@@ -86,7 +86,8 @@ static void vdso_init_data(struct vdso_data *vd) | |||
86 | unsigned int facility_list; | 86 | unsigned int facility_list; |
87 | 87 | ||
88 | facility_list = stfl(); | 88 | facility_list = stfl(); |
89 | vd->ectg_available = switch_amode && (facility_list & 1); | 89 | vd->ectg_available = |
90 | user_mode != HOME_SPACE_MODE && (facility_list & 1); | ||
90 | } | 91 | } |
91 | 92 | ||
92 | #ifdef CONFIG_64BIT | 93 | #ifdef CONFIG_64BIT |
@@ -114,7 +115,7 @@ int vdso_alloc_per_cpu(int cpu, struct _lowcore *lowcore) | |||
114 | 115 | ||
115 | lowcore->vdso_per_cpu_data = __LC_PASTE; | 116 | lowcore->vdso_per_cpu_data = __LC_PASTE; |
116 | 117 | ||
117 | if (!switch_amode || !vdso_enabled) | 118 | if (user_mode == HOME_SPACE_MODE || !vdso_enabled) |
118 | return 0; | 119 | return 0; |
119 | 120 | ||
120 | segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER); | 121 | segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER); |
@@ -160,7 +161,7 @@ void vdso_free_per_cpu(int cpu, struct _lowcore *lowcore) | |||
160 | unsigned long segment_table, page_table, page_frame; | 161 | unsigned long segment_table, page_table, page_frame; |
161 | u32 *psal, *aste; | 162 | u32 *psal, *aste; |
162 | 163 | ||
163 | if (!switch_amode || !vdso_enabled) | 164 | if (user_mode == HOME_SPACE_MODE || !vdso_enabled) |
164 | return; | 165 | return; |
165 | 166 | ||
166 | psal = (u32 *)(addr_t) lowcore->paste[4]; | 167 | psal = (u32 *)(addr_t) lowcore->paste[4]; |
@@ -184,7 +185,7 @@ static void __vdso_init_cr5(void *dummy) | |||
184 | 185 | ||
185 | static void vdso_init_cr5(void) | 186 | static void vdso_init_cr5(void) |
186 | { | 187 | { |
187 | if (switch_amode && vdso_enabled) | 188 | if (user_mode != HOME_SPACE_MODE && vdso_enabled) |
188 | on_each_cpu(__vdso_init_cr5, NULL, 1); | 189 | on_each_cpu(__vdso_init_cr5, NULL, 1); |
189 | } | 190 | } |
190 | #endif /* CONFIG_64BIT */ | 191 | #endif /* CONFIG_64BIT */ |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index c41bb0d416e1..b59a812a010e 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -167,6 +167,8 @@ void vtime_stop_cpu(void) | |||
167 | /* Wait for external, I/O or machine check interrupt. */ | 167 | /* Wait for external, I/O or machine check interrupt. */ |
168 | psw.mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT; | 168 | psw.mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT; |
169 | 169 | ||
170 | idle->nohz_delay = 0; | ||
171 | |||
170 | /* Check if the CPU timer needs to be reprogrammed. */ | 172 | /* Check if the CPU timer needs to be reprogrammed. */ |
171 | if (vq->do_spt) { | 173 | if (vq->do_spt) { |
172 | __u64 vmax = VTIMER_MAX_SLICE; | 174 | __u64 vmax = VTIMER_MAX_SLICE; |