diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-02 13:54:56 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-02 14:31:10 (GMT) |
commit | b5e64b3de7fdd1db0a12871f7114fc1da899df8e (patch) | |
tree | f6c7dae3006a8f16ecfea0d8f6b2ae0c83ea69df /arch/s390/kernel/vdso64/clock_gettime.S | |
parent | 06aae6834eb473c94a2493c145fc3e6c9fcf26a5 (diff) | |
download | linux-b5e64b3de7fdd1db0a12871f7114fc1da899df8e.tar.xz |
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_gettime.S')
-rw-r--r-- | arch/s390/kernel/vdso64/clock_gettime.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index 0add107..4007007 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S @@ -22,7 +22,9 @@ __kernel_clock_gettime: larl %r5,_vdso_data cghi %r2,__CLOCK_REALTIME je 4f - cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */ + cghi %r2,__CLOCK_THREAD_CPUTIME_ID + je 9f + cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */ je 9f cghi %r2,__CLOCK_MONOTONIC jne 12f |