Skip to content

Commit 10bc15b

Browse files
author
Vasily Gorbik
committed
s390: assume stckf is always present
With z10 as minimum supported machine generation the store-clock-fast facility (25) is always present and checked in als code. Drop alternatives and always use stckf. Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent bedc966 commit 10bc15b

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

arch/s390/kernel/entry.S

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ _LPP_OFFSET = __LC_LPP
9898
#endif
9999
.endm
100100

101-
.macro STCK savearea
102-
ALTERNATIVE ".insn s,0xb2050000,\savearea", \
103-
".insn s,0xb27c0000,\savearea", 25
104-
.endm
105-
106101
/*
107102
* The TSTMSK macro generates a test-under-mask instruction by
108103
* calculating the memory offset for the specified mask value.
@@ -442,7 +437,7 @@ ENDPROC(pgm_check_handler)
442437
*/
443438
.macro INT_HANDLER name,lc_old_psw,handler
444439
ENTRY(\name)
445-
STCK __LC_INT_CLOCK
440+
stckf __LC_INT_CLOCK
446441
stpt __LC_SYS_ENTER_TIMER
447442
STBEAR __LC_LAST_BREAK
448443
BPOFF
@@ -514,7 +509,7 @@ ENTRY(psw_idle)
514509
.Lpsw_idle_stcctm:
515510
oi __LC_CPU_FLAGS+7,_CIF_ENABLED_WAIT
516511
BPON
517-
STCK __CLOCK_IDLE_ENTER(%r2)
512+
stckf __CLOCK_IDLE_ENTER(%r2)
518513
stpt __TIMER_IDLE_ENTER(%r2)
519514
lpswe __SF_EMPTY(%r15)
520515
.globl psw_idle_exit
@@ -526,7 +521,7 @@ ENDPROC(psw_idle)
526521
* Machine check handler routines
527522
*/
528523
ENTRY(mcck_int_handler)
529-
STCK __LC_MCCK_CLOCK
524+
stckf __LC_MCCK_CLOCK
530525
BPOFF
531526
la %r1,4095 # validate r1
532527
spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # validate cpu timer

arch/s390/kernel/vtime.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,12 @@ static int do_account_vtime(struct task_struct *tsk)
128128

129129
timer = S390_lowcore.last_update_timer;
130130
clock = S390_lowcore.last_update_clock;
131-
/* Use STORE CLOCK by default, STORE CLOCK FAST if available. */
132-
alternative_io("stpt %0\n .insn s,0xb2050000,%1\n",
133-
"stpt %0\n .insn s,0xb27c0000,%1\n",
134-
25,
135-
ASM_OUTPUT2("=Q" (S390_lowcore.last_update_timer),
136-
"=Q" (S390_lowcore.last_update_clock)),
137-
ASM_NO_INPUT_CLOBBER("cc"));
131+
asm volatile(
132+
" stpt %0\n" /* Store current cpu timer value */
133+
" stckf %1" /* Store current tod clock value */
134+
: "=Q" (S390_lowcore.last_update_timer),
135+
"=Q" (S390_lowcore.last_update_clock)
136+
: : "cc");
138137
clock = S390_lowcore.last_update_clock - clock;
139138
timer -= S390_lowcore.last_update_timer;
140139

0 commit comments

Comments
 (0)