Skip to content

Commit 1f759bb

Browse files
author
Martin Schwidefsky
committed
s390/time: use stck clock fast for do_account_vtime
The last high frequency call site of the STCK instruction is do_account_vtime. Replace it with the faster STCKF instruction. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent cac7f24 commit 1f759bb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/s390/kernel/vtime.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)
6666
clock = S390_lowcore.last_update_clock;
6767
asm volatile(
6868
" 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
6972
" stck %1" /* Store current tod clock value */
73+
#endif
7074
: "=m" (S390_lowcore.last_update_timer),
7175
"=m" (S390_lowcore.last_update_clock));
7276
S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer;

0 commit comments

Comments
 (0)