aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vdso64/clock_getres.S
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2013-12-02 14:54:56 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-12-02 15:31:10 +0100
commitb5e64b3de7fdd1db0a12871f7114fc1da899df8e (patch)
treef6c7dae3006a8f16ecfea0d8f6b2ae0c83ea69df /arch/s390/kernel/vdso64/clock_getres.S
parents390/vdso: fix access-list entry initialization (diff)
downloadlinux-dev-b5e64b3de7fdd1db0a12871f7114fc1da899df8e.tar.xz
linux-dev-b5e64b3de7fdd1db0a12871f7114fc1da899df8e.zip
s390/vdso: ectg gettime support for CLOCK_THREAD_CPUTIME_ID
The code to use the ECTG instruction to calculate the cputime for the current thread is currently used only for the per-thread CPU-clock with the clockid -2 (PID=0, VIRT=1). Use the same code for the clockid CLOCK_THREAD_CPUTIME_ID to speed up the more common clockid as well. Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/vdso64/clock_getres.S')
-rw-r--r--arch/s390/kernel/vdso64/clock_getres.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/kernel/vdso64/clock_getres.S b/arch/s390/kernel/vdso64/clock_getres.S
index 176e1f75f9aa..34deba7c7ed1 100644
--- a/arch/s390/kernel/vdso64/clock_getres.S
+++ b/arch/s390/kernel/vdso64/clock_getres.S
@@ -23,7 +23,9 @@ __kernel_clock_getres:
je 0f
cghi %r2,__CLOCK_MONOTONIC
je 0f
- cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */
+ cghi %r2,__CLOCK_THREAD_CPUTIME_ID
+ je 0f
+ cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */
jne 2f
larl %r5,_vdso_data
icm %r0,15,__LC_ECTG_OK(%r5)