aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vdso64
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-01-27 09:15:13 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-02-12 03:37:21 -0500
commit49253925c0be02ed4eb7d94a426731107dd8059d (patch)
tree350203d651419aa715ca6fe3ef9d8b0ab620aea2 /arch/s390/kernel/vdso64
parent8cc748aa76c921d8834ef00f762f31acd2c93aa8 (diff)
s390/vdso: fix clock_gettime for CLOCK_THREAD_CPUTIME_ID, -2 and -3
Git commit 8d8f2e18a6dbd3d09dd918788422e6ac8c878e96 "s390/vdso: ectg gettime support for CLOCK_THREAD_CPUTIME_ID" broke clock_gettime for CLOCK_THREAD_CPUTIME_ID. Git commit c742b31c03f37c5c499178f09f57381aa6c70131 "fast vdso implementation for CLOCK_THREAD_CPUTIME_ID" introduced the ECTG for clock id -2. Correct would have been clock id -3. Fix the whole mess, CLOCK_THREAD_CPUTIME_ID is based on CPUCLOCK_SCHED and can not be speed up by the vdso. A speedup is only available for clock id -3 which is CPUCLOCK_VIRT for the task currently running on the CPU. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/vdso64')
-rw-r--r--arch/s390/kernel/vdso64/clock_gettime.S6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S
index 7699e735ae28..61541fb93dc6 100644
--- a/arch/s390/kernel/vdso64/clock_gettime.S
+++ b/arch/s390/kernel/vdso64/clock_gettime.S
@@ -25,9 +25,7 @@ __kernel_clock_gettime:
25 je 4f 25 je 4f
26 cghi %r2,__CLOCK_REALTIME 26 cghi %r2,__CLOCK_REALTIME
27 je 5f 27 je 5f
28 cghi %r2,__CLOCK_THREAD_CPUTIME_ID 28 cghi %r2,-3 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */
29 je 9f
30 cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */
31 je 9f 29 je 9f
32 cghi %r2,__CLOCK_MONOTONIC_COARSE 30 cghi %r2,__CLOCK_MONOTONIC_COARSE
33 je 3f 31 je 3f
@@ -106,7 +104,7 @@ __kernel_clock_gettime:
106 aghi %r15,16 104 aghi %r15,16
107 br %r14 105 br %r14
108 106
109 /* CLOCK_THREAD_CPUTIME_ID for this thread */ 107 /* CPUCLOCK_VIRT for this thread */
1109: icm %r0,15,__VDSO_ECTG_OK(%r5) 1089: icm %r0,15,__VDSO_ECTG_OK(%r5)
111 jz 12f 109 jz 12f
112 ear %r2,%a4 110 ear %r2,%a4