diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-10-20 12:24:39 +0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-10-27 15:27:01 +0300 |
commit | 1f759bb3a2a0d75ceeeec729b1c66a7f443631ba (patch) | |
tree | cd481b9e09cb8fcfe703957bd11c0996528586d6 /arch/s390/kernel/vtime.c | |
parent | cac7f2429872d3733dc3f9915857b1691da2eb2f (diff) | |
download | linux-1f759bb3a2a0d75ceeeec729b1c66a7f443631ba.tar.xz |
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>
Diffstat (limited to 'arch/s390/kernel/vtime.c')
-rw-r--r-- | arch/s390/kernel/vtime.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 416f2a323ba5..7f0089d9a4aa 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -66,7 +66,11 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset) clock = S390_lowcore.last_update_clock; asm volatile( " stpt %0\n" /* Store current cpu timer value */ +#ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES + " stckf %1" /* Store current tod clock value */ +#else " stck %1" /* Store current tod clock value */ +#endif : "=m" (S390_lowcore.last_update_timer), "=m" (S390_lowcore.last_update_clock)); S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; |