aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-05-09 10:27:39 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-05-16 08:42:41 -0400
commit473e66baad1e83e6c5dfdca65aba03bf21727202 (patch)
treeaab0bd4a295b41d1e29952b2b1260ad72150496b /arch/s390/kernel
parent2739b6d12407792f253b7a15233930338e6831c9 (diff)
s390/time: always use stckf instead of stck if available
The store clock fast instruction saves a couple of instructions compared to the store clock instruction. Always use stckf instead of stck if it is available. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/early.c2
-rw-r--r--arch/s390/kernel/entry64.S16
2 files changed, 12 insertions, 6 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 9475e682727f..d84181f1f5e8 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -374,8 +374,6 @@ static __init void detect_machine_facilities(void)
374 S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS; 374 S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS;
375 if (test_facility(40)) 375 if (test_facility(40))
376 S390_lowcore.machine_flags |= MACHINE_FLAG_SPP; 376 S390_lowcore.machine_flags |= MACHINE_FLAG_SPP;
377 if (test_facility(25))
378 S390_lowcore.machine_flags |= MACHINE_FLAG_STCKF;
379#endif 377#endif
380} 378}
381 379
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 3a633af72bae..444fd72e0787 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -148,6 +148,14 @@ _TIF_EXIT_SIE = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING)
148 ssm __LC_RETURN_PSW 148 ssm __LC_RETURN_PSW
149 .endm 149 .endm
150 150
151 .macro STCK savearea
152#if defined(CONFIG_64BIT) && !defined(CONFIG_MARCH_Z900) && !defined(CONFIG_MARCH_Z990)
153 .insn s,0xb27c0000,\savearea # store clock fast
154#else
155 .insn s,0xb2050000,\savearea # store clock
156#endif
157 .endm
158
151 .section .kprobes.text, "ax" 159 .section .kprobes.text, "ax"
152 160
153/* 161/*
@@ -458,7 +466,7 @@ pgm_svcper:
458 * IO interrupt handler routine 466 * IO interrupt handler routine
459 */ 467 */
460ENTRY(io_int_handler) 468ENTRY(io_int_handler)
461 stck __LC_INT_CLOCK 469 STCK __LC_INT_CLOCK
462 stpt __LC_ASYNC_ENTER_TIMER 470 stpt __LC_ASYNC_ENTER_TIMER
463 stmg %r8,%r15,__LC_SAVE_AREA_ASYNC 471 stmg %r8,%r15,__LC_SAVE_AREA_ASYNC
464 lg %r10,__LC_LAST_BREAK 472 lg %r10,__LC_LAST_BREAK
@@ -604,7 +612,7 @@ io_notify_resume:
604 * External interrupt handler routine 612 * External interrupt handler routine
605 */ 613 */
606ENTRY(ext_int_handler) 614ENTRY(ext_int_handler)
607 stck __LC_INT_CLOCK 615 STCK __LC_INT_CLOCK
608 stpt __LC_ASYNC_ENTER_TIMER 616 stpt __LC_ASYNC_ENTER_TIMER
609 stmg %r8,%r15,__LC_SAVE_AREA_ASYNC 617 stmg %r8,%r15,__LC_SAVE_AREA_ASYNC
610 lg %r10,__LC_LAST_BREAK 618 lg %r10,__LC_LAST_BREAK
@@ -639,7 +647,7 @@ ENTRY(psw_idle)
639 larl %r1,psw_idle_lpsw+4 647 larl %r1,psw_idle_lpsw+4
640 stg %r1,__SF_EMPTY+8(%r15) 648 stg %r1,__SF_EMPTY+8(%r15)
641 larl %r1,.Lvtimer_max 649 larl %r1,.Lvtimer_max
642 stck __IDLE_ENTER(%r2) 650 STCK __IDLE_ENTER(%r2)
643 ltr %r5,%r5 651 ltr %r5,%r5
644 stpt __VQ_IDLE_ENTER(%r3) 652 stpt __VQ_IDLE_ENTER(%r3)
645 jz psw_idle_lpsw 653 jz psw_idle_lpsw
@@ -655,7 +663,7 @@ __critical_end:
655 * Machine check handler routines 663 * Machine check handler routines
656 */ 664 */
657ENTRY(mcck_int_handler) 665ENTRY(mcck_int_handler)
658 stck __LC_MCCK_CLOCK 666 STCK __LC_MCCK_CLOCK
659 la %r1,4095 # revalidate r1 667 la %r1,4095 # revalidate r1
660 spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer 668 spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer
661 lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs 669 lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs