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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user