Commit 10bc15ba authored by Vasily Gorbik's avatar Vasily Gorbik
Browse files

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: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent bedc9669
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -98,11 +98,6 @@ _LPP_OFFSET = __LC_LPP
#endif
	.endm

	.macro STCK savearea
	ALTERNATIVE ".insn	s,0xb2050000,\savearea", \
		    ".insn	s,0xb27c0000,\savearea", 25
	.endm

	/*
	 * The TSTMSK macro generates a test-under-mask instruction by
	 * calculating the memory offset for the specified mask value.
@@ -442,7 +437,7 @@ ENDPROC(pgm_check_handler)
 */
.macro INT_HANDLER name,lc_old_psw,handler
ENTRY(\name)
	STCK	__LC_INT_CLOCK
	stckf	__LC_INT_CLOCK
	stpt	__LC_SYS_ENTER_TIMER
	STBEAR	__LC_LAST_BREAK
	BPOFF
@@ -514,7 +509,7 @@ ENTRY(psw_idle)
.Lpsw_idle_stcctm:
	oi	__LC_CPU_FLAGS+7,_CIF_ENABLED_WAIT
	BPON
	STCK	__CLOCK_IDLE_ENTER(%r2)
	stckf	__CLOCK_IDLE_ENTER(%r2)
	stpt	__TIMER_IDLE_ENTER(%r2)
	lpswe	__SF_EMPTY(%r15)
.globl psw_idle_exit
@@ -526,7 +521,7 @@ ENDPROC(psw_idle)
 * Machine check handler routines
 */
ENTRY(mcck_int_handler)
	STCK	__LC_MCCK_CLOCK
	stckf	__LC_MCCK_CLOCK
	BPOFF
	la	%r1,4095		# validate r1
	spt	__LC_CPU_TIMER_SAVE_AREA-4095(%r1)	# validate cpu timer
+6 −7
Original line number Diff line number Diff line
@@ -128,13 +128,12 @@ static int do_account_vtime(struct task_struct *tsk)

	timer = S390_lowcore.last_update_timer;
	clock = S390_lowcore.last_update_clock;
	/* Use STORE CLOCK by default, STORE CLOCK FAST if available. */
	alternative_io("stpt %0\n .insn s,0xb2050000,%1\n",
		       "stpt %0\n .insn s,0xb27c0000,%1\n",
		       25,
		       ASM_OUTPUT2("=Q" (S390_lowcore.last_update_timer),
				   "=Q" (S390_lowcore.last_update_clock)),
		       ASM_NO_INPUT_CLOBBER("cc"));
	asm volatile(
		"	stpt	%0\n"	/* Store current cpu timer value */
		"	stckf	%1"	/* Store current tod clock value */
		: "=Q" (S390_lowcore.last_update_timer),
		  "=Q" (S390_lowcore.last_update_clock)
		: : "cc");
	clock = S390_lowcore.last_update_clock - clock;
	timer -= S390_lowcore.last_update_timer;