diff mbox

[1/4,Xenial,SRU,V2] s390/facilities: use stfl mnemonic instead of insn magic

Message ID 1460185965-9497-1-git-send-email-tim.gardner@canonical.com
State New
Headers show

Commit Message

Tim Gardner April 9, 2016, 7:12 a.m. UTC
From: Heiko Carstens <heiko.carstens@de.ibm.com>

BugLink: http://bugs.launchpad.net/bugs/1555344

Now that 31 bit support is gone, the assembler always knows about the
stfl instruction. Therefore lets use a readable mnemonic.  Also remove
the not needed extable entry for the inline assembly and fix the
output constraint.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit 9552a66fe622ed53b87278a90917a37a5245e68a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/s390/include/asm/facility.h | 6 ++----
 arch/s390/kernel/head.S          | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

Comments

Seth Forshee April 11, 2016, 2:41 p.m. UTC | #1
Ack for all 4 patches.
Stefan Bader April 11, 2016, 2:42 p.m. UTC | #2
to 1-4, limited to s390x and cherry-picks suggested by IBM.
Tim Gardner April 11, 2016, 7:09 p.m. UTC | #3

diff mbox

Patch

diff --git a/arch/s390/include/asm/facility.h b/arch/s390/include/asm/facility.h
index 0aa6a7e..b4f99d2 100644
--- a/arch/s390/include/asm/facility.h
+++ b/arch/s390/include/asm/facility.h
@@ -44,10 +44,8 @@  static inline void stfle(u64 *stfle_fac_list, int size)
 
 	preempt_disable();
 	asm volatile(
-		"	.insn s,0xb2b10000,0(0)\n" /* stfl */
-		"0:\n"
-		EX_TABLE(0b, 0b)
-		: "+m" (S390_lowcore.stfl_fac_list));
+		"	stfl	0(0)\n"
+		: "=m" (S390_lowcore.stfl_fac_list));
 	nr = 4; /* bytes stored by stfl */
 	memcpy(stfle_fac_list, &S390_lowcore.stfl_fac_list, 4);
 	if (S390_lowcore.stfl_fac_list & 0x01000000) {
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index 301ee9c..d893d5a 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -306,7 +306,7 @@  ENTRY(startup_kdump)
 	mvc	__LC_LAST_UPDATE_TIMER(8),6f-.LPG0(%r13)
 	xc	__LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
 	# check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
-	.insn	s,0xb2b10000,0		# store facilities @ __LC_STFL_FAC_LIST
+	stfl	0(%r0)			# store facilities @ __LC_STFL_FAC_LIST
 	tm	__LC_STFL_FAC_LIST,0x01	# stfle available ?
 	jz	0f
 	la	%r0,1