diff options
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/compat_wrapper.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/ftrace.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/perf_cpum_sf.c | 6 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 1 | ||||
-rw-r--r-- | arch/s390/kernel/uprobes.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/vdso32/clock_gettime.S | 12 | ||||
-rw-r--r-- | arch/s390/kernel/vdso32/gettimeofday.S | 14 | ||||
-rw-r--r-- | arch/s390/kernel/vdso64/clock_gettime.S | 13 | ||||
-rw-r--r-- | arch/s390/kernel/vdso64/gettimeofday.S | 6 | ||||
-rw-r--r-- | arch/s390/kernel/vtime.c | 4 |
10 files changed, 38 insertions, 23 deletions
diff --git a/arch/s390/kernel/compat_wrapper.c b/arch/s390/kernel/compat_wrapper.c index faf6caa510dc..c4f7a3d655b8 100644 --- a/arch/s390/kernel/compat_wrapper.c +++ b/arch/s390/kernel/compat_wrapper.c | |||
@@ -217,3 +217,4 @@ COMPAT_SYSCALL_WRAP5(renameat2, int, olddfd, const char __user *, oldname, int, | |||
217 | COMPAT_SYSCALL_WRAP3(seccomp, unsigned int, op, unsigned int, flags, const char __user *, uargs) | 217 | COMPAT_SYSCALL_WRAP3(seccomp, unsigned int, op, unsigned int, flags, const char __user *, uargs) |
218 | COMPAT_SYSCALL_WRAP3(getrandom, char __user *, buf, size_t, count, unsigned int, flags) | 218 | COMPAT_SYSCALL_WRAP3(getrandom, char __user *, buf, size_t, count, unsigned int, flags) |
219 | COMPAT_SYSCALL_WRAP2(memfd_create, const char __user *, uname, unsigned int, flags) | 219 | COMPAT_SYSCALL_WRAP2(memfd_create, const char __user *, uname, unsigned int, flags) |
220 | COMPAT_SYSCALL_WRAP3(bpf, int, cmd, union bpf_attr *, attr, unsigned int, size); | ||
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c index 51d14fe5eb9a..ca1cabb3a96c 100644 --- a/arch/s390/kernel/ftrace.c +++ b/arch/s390/kernel/ftrace.c | |||
@@ -121,6 +121,8 @@ unsigned long __kprobes prepare_ftrace_return(unsigned long parent, | |||
121 | { | 121 | { |
122 | struct ftrace_graph_ent trace; | 122 | struct ftrace_graph_ent trace; |
123 | 123 | ||
124 | if (unlikely(ftrace_graph_is_dead())) | ||
125 | goto out; | ||
124 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) | 126 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) |
125 | goto out; | 127 | goto out; |
126 | ip = (ip & PSW_ADDR_INSN) - MCOUNT_INSN_SIZE; | 128 | ip = (ip & PSW_ADDR_INSN) - MCOUNT_INSN_SIZE; |
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c index 08e761318c17..b878f12a9597 100644 --- a/arch/s390/kernel/perf_cpum_sf.c +++ b/arch/s390/kernel/perf_cpum_sf.c | |||
@@ -1411,11 +1411,6 @@ static void cpumsf_pmu_del(struct perf_event *event, int flags) | |||
1411 | perf_pmu_enable(event->pmu); | 1411 | perf_pmu_enable(event->pmu); |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static int cpumsf_pmu_event_idx(struct perf_event *event) | ||
1415 | { | ||
1416 | return event->hw.idx; | ||
1417 | } | ||
1418 | |||
1419 | CPUMF_EVENT_ATTR(SF, SF_CYCLES_BASIC, PERF_EVENT_CPUM_SF); | 1414 | CPUMF_EVENT_ATTR(SF, SF_CYCLES_BASIC, PERF_EVENT_CPUM_SF); |
1420 | CPUMF_EVENT_ATTR(SF, SF_CYCLES_BASIC_DIAG, PERF_EVENT_CPUM_SF_DIAG); | 1415 | CPUMF_EVENT_ATTR(SF, SF_CYCLES_BASIC_DIAG, PERF_EVENT_CPUM_SF_DIAG); |
1421 | 1416 | ||
@@ -1458,7 +1453,6 @@ static struct pmu cpumf_sampling = { | |||
1458 | .stop = cpumsf_pmu_stop, | 1453 | .stop = cpumsf_pmu_stop, |
1459 | .read = cpumsf_pmu_read, | 1454 | .read = cpumsf_pmu_read, |
1460 | 1455 | ||
1461 | .event_idx = cpumsf_pmu_event_idx, | ||
1462 | .attr_groups = cpumsf_pmu_attr_groups, | 1456 | .attr_groups = cpumsf_pmu_attr_groups, |
1463 | }; | 1457 | }; |
1464 | 1458 | ||
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 6fe886ac2db5..9f7087fd58de 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -359,3 +359,4 @@ SYSCALL(sys_renameat2,sys_renameat2,compat_sys_renameat2) | |||
359 | SYSCALL(sys_seccomp,sys_seccomp,compat_sys_seccomp) | 359 | SYSCALL(sys_seccomp,sys_seccomp,compat_sys_seccomp) |
360 | SYSCALL(sys_getrandom,sys_getrandom,compat_sys_getrandom) | 360 | SYSCALL(sys_getrandom,sys_getrandom,compat_sys_getrandom) |
361 | SYSCALL(sys_memfd_create,sys_memfd_create,compat_sys_memfd_create) /* 350 */ | 361 | SYSCALL(sys_memfd_create,sys_memfd_create,compat_sys_memfd_create) /* 350 */ |
362 | SYSCALL(sys_bpf,sys_bpf,compat_sys_bpf) | ||
diff --git a/arch/s390/kernel/uprobes.c b/arch/s390/kernel/uprobes.c index 956f4f7a591c..f6b3cd056ec2 100644 --- a/arch/s390/kernel/uprobes.c +++ b/arch/s390/kernel/uprobes.c | |||
@@ -5,13 +5,13 @@ | |||
5 | * Author(s): Jan Willeke, | 5 | * Author(s): Jan Willeke, |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/kprobes.h> | ||
9 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
10 | #include <linux/uprobes.h> | 9 | #include <linux/uprobes.h> |
11 | #include <linux/compat.h> | 10 | #include <linux/compat.h> |
12 | #include <linux/kdebug.h> | 11 | #include <linux/kdebug.h> |
13 | #include <asm/switch_to.h> | 12 | #include <asm/switch_to.h> |
14 | #include <asm/facility.h> | 13 | #include <asm/facility.h> |
14 | #include <asm/kprobes.h> | ||
15 | #include <asm/dis.h> | 15 | #include <asm/dis.h> |
16 | #include "entry.h" | 16 | #include "entry.h" |
17 | 17 | ||
diff --git a/arch/s390/kernel/vdso32/clock_gettime.S b/arch/s390/kernel/vdso32/clock_gettime.S index 48c2206a3956..5eec9afbb5b5 100644 --- a/arch/s390/kernel/vdso32/clock_gettime.S +++ b/arch/s390/kernel/vdso32/clock_gettime.S | |||
@@ -19,6 +19,7 @@ | |||
19 | .type __kernel_clock_gettime,@function | 19 | .type __kernel_clock_gettime,@function |
20 | __kernel_clock_gettime: | 20 | __kernel_clock_gettime: |
21 | .cfi_startproc | 21 | .cfi_startproc |
22 | ahi %r15,-16 | ||
22 | basr %r5,0 | 23 | basr %r5,0 |
23 | 0: al %r5,21f-0b(%r5) /* get &_vdso_data */ | 24 | 0: al %r5,21f-0b(%r5) /* get &_vdso_data */ |
24 | chi %r2,__CLOCK_REALTIME_COARSE | 25 | chi %r2,__CLOCK_REALTIME_COARSE |
@@ -34,8 +35,8 @@ __kernel_clock_gettime: | |||
34 | 1: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 35 | 1: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
35 | tml %r4,0x0001 /* pending update ? loop */ | 36 | tml %r4,0x0001 /* pending update ? loop */ |
36 | jnz 1b | 37 | jnz 1b |
37 | stcke 24(%r15) /* Store TOD clock */ | 38 | stcke 0(%r15) /* Store TOD clock */ |
38 | lm %r0,%r1,25(%r15) | 39 | lm %r0,%r1,1(%r15) |
39 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 40 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
40 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 41 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
41 | brc 3,2f | 42 | brc 3,2f |
@@ -70,6 +71,7 @@ __kernel_clock_gettime: | |||
70 | 8: st %r2,0(%r3) /* store tp->tv_sec */ | 71 | 8: st %r2,0(%r3) /* store tp->tv_sec */ |
71 | st %r1,4(%r3) /* store tp->tv_nsec */ | 72 | st %r1,4(%r3) /* store tp->tv_nsec */ |
72 | lhi %r2,0 | 73 | lhi %r2,0 |
74 | ahi %r15,16 | ||
73 | br %r14 | 75 | br %r14 |
74 | 76 | ||
75 | /* CLOCK_MONOTONIC_COARSE */ | 77 | /* CLOCK_MONOTONIC_COARSE */ |
@@ -96,8 +98,8 @@ __kernel_clock_gettime: | |||
96 | 11: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 98 | 11: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
97 | tml %r4,0x0001 /* pending update ? loop */ | 99 | tml %r4,0x0001 /* pending update ? loop */ |
98 | jnz 11b | 100 | jnz 11b |
99 | stcke 24(%r15) /* Store TOD clock */ | 101 | stcke 0(%r15) /* Store TOD clock */ |
100 | lm %r0,%r1,25(%r15) | 102 | lm %r0,%r1,1(%r15) |
101 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 103 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
102 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 104 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
103 | brc 3,12f | 105 | brc 3,12f |
@@ -132,11 +134,13 @@ __kernel_clock_gettime: | |||
132 | 17: st %r2,0(%r3) /* store tp->tv_sec */ | 134 | 17: st %r2,0(%r3) /* store tp->tv_sec */ |
133 | st %r1,4(%r3) /* store tp->tv_nsec */ | 135 | st %r1,4(%r3) /* store tp->tv_nsec */ |
134 | lhi %r2,0 | 136 | lhi %r2,0 |
137 | ahi %r15,16 | ||
135 | br %r14 | 138 | br %r14 |
136 | 139 | ||
137 | /* Fallback to system call */ | 140 | /* Fallback to system call */ |
138 | 19: lhi %r1,__NR_clock_gettime | 141 | 19: lhi %r1,__NR_clock_gettime |
139 | svc 0 | 142 | svc 0 |
143 | ahi %r15,16 | ||
140 | br %r14 | 144 | br %r14 |
141 | 145 | ||
142 | 20: .long 1000000000 | 146 | 20: .long 1000000000 |
diff --git a/arch/s390/kernel/vdso32/gettimeofday.S b/arch/s390/kernel/vdso32/gettimeofday.S index 60def5f562db..719de6186b20 100644 --- a/arch/s390/kernel/vdso32/gettimeofday.S +++ b/arch/s390/kernel/vdso32/gettimeofday.S | |||
@@ -19,6 +19,7 @@ | |||
19 | .type __kernel_gettimeofday,@function | 19 | .type __kernel_gettimeofday,@function |
20 | __kernel_gettimeofday: | 20 | __kernel_gettimeofday: |
21 | .cfi_startproc | 21 | .cfi_startproc |
22 | ahi %r15,-16 | ||
22 | basr %r5,0 | 23 | basr %r5,0 |
23 | 0: al %r5,13f-0b(%r5) /* get &_vdso_data */ | 24 | 0: al %r5,13f-0b(%r5) /* get &_vdso_data */ |
24 | 1: ltr %r3,%r3 /* check if tz is NULL */ | 25 | 1: ltr %r3,%r3 /* check if tz is NULL */ |
@@ -29,30 +30,30 @@ __kernel_gettimeofday: | |||
29 | l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 30 | l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
30 | tml %r4,0x0001 /* pending update ? loop */ | 31 | tml %r4,0x0001 /* pending update ? loop */ |
31 | jnz 1b | 32 | jnz 1b |
32 | stcke 24(%r15) /* Store TOD clock */ | 33 | stcke 0(%r15) /* Store TOD clock */ |
33 | lm %r0,%r1,25(%r15) | 34 | lm %r0,%r1,1(%r15) |
34 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 35 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
35 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 36 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
36 | brc 3,3f | 37 | brc 3,3f |
37 | ahi %r0,-1 | 38 | ahi %r0,-1 |
38 | 3: ms %r0,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 39 | 3: ms %r0,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
39 | st %r0,24(%r15) | 40 | st %r0,0(%r15) |
40 | l %r0,__VDSO_TK_MULT(%r5) | 41 | l %r0,__VDSO_TK_MULT(%r5) |
41 | ltr %r1,%r1 | 42 | ltr %r1,%r1 |
42 | mr %r0,%r0 | 43 | mr %r0,%r0 |
43 | jnm 4f | 44 | jnm 4f |
44 | a %r0,__VDSO_TK_MULT(%r5) | 45 | a %r0,__VDSO_TK_MULT(%r5) |
45 | 4: al %r0,24(%r15) | 46 | 4: al %r0,0(%r15) |
46 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 47 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
47 | al %r1,__VDSO_XTIME_NSEC+4(%r5) | 48 | al %r1,__VDSO_XTIME_NSEC+4(%r5) |
48 | brc 12,5f | 49 | brc 12,5f |
49 | ahi %r0,1 | 50 | ahi %r0,1 |
50 | 5: mvc 24(4,%r15),__VDSO_XTIME_SEC+4(%r5) | 51 | 5: mvc 0(4,%r15),__VDSO_XTIME_SEC+4(%r5) |
51 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ | 52 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ |
52 | jne 1b | 53 | jne 1b |
53 | l %r4,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 54 | l %r4,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
54 | srdl %r0,0(%r4) /* >> tk->shift */ | 55 | srdl %r0,0(%r4) /* >> tk->shift */ |
55 | l %r4,24(%r15) /* get tv_sec from stack */ | 56 | l %r4,0(%r15) /* get tv_sec from stack */ |
56 | basr %r5,0 | 57 | basr %r5,0 |
57 | 6: ltr %r0,%r0 | 58 | 6: ltr %r0,%r0 |
58 | jnz 7f | 59 | jnz 7f |
@@ -71,6 +72,7 @@ __kernel_gettimeofday: | |||
71 | 9: srl %r0,6 | 72 | 9: srl %r0,6 |
72 | st %r0,4(%r2) /* store tv->tv_usec */ | 73 | st %r0,4(%r2) /* store tv->tv_usec */ |
73 | 10: slr %r2,%r2 | 74 | 10: slr %r2,%r2 |
75 | ahi %r15,16 | ||
74 | br %r14 | 76 | br %r14 |
75 | 11: .long 1000000000 | 77 | 11: .long 1000000000 |
76 | 12: .long 274877907 | 78 | 12: .long 274877907 |
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index 9d9761f8e110..7699e735ae28 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S | |||
@@ -19,6 +19,7 @@ | |||
19 | .type __kernel_clock_gettime,@function | 19 | .type __kernel_clock_gettime,@function |
20 | __kernel_clock_gettime: | 20 | __kernel_clock_gettime: |
21 | .cfi_startproc | 21 | .cfi_startproc |
22 | aghi %r15,-16 | ||
22 | larl %r5,_vdso_data | 23 | larl %r5,_vdso_data |
23 | cghi %r2,__CLOCK_REALTIME_COARSE | 24 | cghi %r2,__CLOCK_REALTIME_COARSE |
24 | je 4f | 25 | je 4f |
@@ -37,10 +38,10 @@ __kernel_clock_gettime: | |||
37 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 38 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
38 | tmll %r4,0x0001 /* pending update ? loop */ | 39 | tmll %r4,0x0001 /* pending update ? loop */ |
39 | jnz 0b | 40 | jnz 0b |
40 | stcke 48(%r15) /* Store TOD clock */ | 41 | stcke 0(%r15) /* Store TOD clock */ |
41 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 42 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
42 | lg %r0,__VDSO_WTOM_SEC(%r5) | 43 | lg %r0,__VDSO_WTOM_SEC(%r5) |
43 | lg %r1,49(%r15) | 44 | lg %r1,1(%r15) |
44 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 45 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
45 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 46 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
46 | alg %r1,__VDSO_WTOM_NSEC(%r5) | 47 | alg %r1,__VDSO_WTOM_NSEC(%r5) |
@@ -56,6 +57,7 @@ __kernel_clock_gettime: | |||
56 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ | 57 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ |
57 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 58 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
58 | lghi %r2,0 | 59 | lghi %r2,0 |
60 | aghi %r15,16 | ||
59 | br %r14 | 61 | br %r14 |
60 | 62 | ||
61 | /* CLOCK_MONOTONIC_COARSE */ | 63 | /* CLOCK_MONOTONIC_COARSE */ |
@@ -82,9 +84,9 @@ __kernel_clock_gettime: | |||
82 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 84 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
83 | tmll %r4,0x0001 /* pending update ? loop */ | 85 | tmll %r4,0x0001 /* pending update ? loop */ |
84 | jnz 5b | 86 | jnz 5b |
85 | stcke 48(%r15) /* Store TOD clock */ | 87 | stcke 0(%r15) /* Store TOD clock */ |
86 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 88 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
87 | lg %r1,49(%r15) | 89 | lg %r1,1(%r15) |
88 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 90 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
89 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 91 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
90 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ | 92 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
@@ -101,6 +103,7 @@ __kernel_clock_gettime: | |||
101 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ | 103 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ |
102 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 104 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
103 | lghi %r2,0 | 105 | lghi %r2,0 |
106 | aghi %r15,16 | ||
104 | br %r14 | 107 | br %r14 |
105 | 108 | ||
106 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 109 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ |
@@ -134,11 +137,13 @@ __kernel_clock_gettime: | |||
134 | slgr %r4,%r0 /* r4 = tv_nsec */ | 137 | slgr %r4,%r0 /* r4 = tv_nsec */ |
135 | stg %r4,8(%r3) | 138 | stg %r4,8(%r3) |
136 | lghi %r2,0 | 139 | lghi %r2,0 |
140 | aghi %r15,16 | ||
137 | br %r14 | 141 | br %r14 |
138 | 142 | ||
139 | /* Fallback to system call */ | 143 | /* Fallback to system call */ |
140 | 12: lghi %r1,__NR_clock_gettime | 144 | 12: lghi %r1,__NR_clock_gettime |
141 | svc 0 | 145 | svc 0 |
146 | aghi %r15,16 | ||
142 | br %r14 | 147 | br %r14 |
143 | 148 | ||
144 | 13: .quad 1000000000 | 149 | 13: .quad 1000000000 |
diff --git a/arch/s390/kernel/vdso64/gettimeofday.S b/arch/s390/kernel/vdso64/gettimeofday.S index 7a344995a97f..6ce46707663c 100644 --- a/arch/s390/kernel/vdso64/gettimeofday.S +++ b/arch/s390/kernel/vdso64/gettimeofday.S | |||
@@ -19,6 +19,7 @@ | |||
19 | .type __kernel_gettimeofday,@function | 19 | .type __kernel_gettimeofday,@function |
20 | __kernel_gettimeofday: | 20 | __kernel_gettimeofday: |
21 | .cfi_startproc | 21 | .cfi_startproc |
22 | aghi %r15,-16 | ||
22 | larl %r5,_vdso_data | 23 | larl %r5,_vdso_data |
23 | 0: ltgr %r3,%r3 /* check if tz is NULL */ | 24 | 0: ltgr %r3,%r3 /* check if tz is NULL */ |
24 | je 1f | 25 | je 1f |
@@ -28,8 +29,8 @@ __kernel_gettimeofday: | |||
28 | lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 29 | lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
29 | tmll %r4,0x0001 /* pending update ? loop */ | 30 | tmll %r4,0x0001 /* pending update ? loop */ |
30 | jnz 0b | 31 | jnz 0b |
31 | stcke 48(%r15) /* Store TOD clock */ | 32 | stcke 0(%r15) /* Store TOD clock */ |
32 | lg %r1,49(%r15) | 33 | lg %r1,1(%r15) |
33 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 34 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
34 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 35 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
35 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ | 36 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
@@ -50,6 +51,7 @@ __kernel_gettimeofday: | |||
50 | srlg %r0,%r0,6 | 51 | srlg %r0,%r0,6 |
51 | stg %r0,8(%r2) /* store tv->tv_usec */ | 52 | stg %r0,8(%r2) /* store tv->tv_usec */ |
52 | 4: lghi %r2,0 | 53 | 4: lghi %r2,0 |
54 | aghi %r15,16 | ||
53 | br %r14 | 55 | br %r14 |
54 | 5: .quad 1000000000 | 56 | 5: .quad 1000000000 |
55 | .long 274877907 | 57 | .long 274877907 |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 416f2a323ba5..7f0089d9a4aa 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -66,7 +66,11 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset) | |||
66 | clock = S390_lowcore.last_update_clock; | 66 | clock = S390_lowcore.last_update_clock; |
67 | asm volatile( | 67 | asm volatile( |
68 | " stpt %0\n" /* Store current cpu timer value */ | 68 | " stpt %0\n" /* Store current cpu timer value */ |
69 | #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES | ||
70 | " stckf %1" /* Store current tod clock value */ | ||
71 | #else | ||
69 | " stck %1" /* Store current tod clock value */ | 72 | " stck %1" /* Store current tod clock value */ |
73 | #endif | ||
70 | : "=m" (S390_lowcore.last_update_timer), | 74 | : "=m" (S390_lowcore.last_update_timer), |
71 | "=m" (S390_lowcore.last_update_clock)); | 75 | "=m" (S390_lowcore.last_update_clock)); |
72 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; | 76 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; |