[PATCH 26/32] s390/boot: Convert inline assembly to EX_TABLE_INSN
From: Heiko Carstens
Date: Thu Oct 01 2026 - 06:51:42 EST
Convert all boot exception table entries to use EX_TABLE_INSN.
Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
---
arch/s390/boot/ipl_parm.c | 6 +++---
arch/s390/boot/physmem_info.c | 18 +++++++++---------
arch/s390/boot/startup.c | 12 ++++++------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index c1b43e5e688a..ff2ac7f16fe0 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -40,9 +40,9 @@ static inline int __diag308(unsigned long subcode, void *addr)
union register_pair r1 = { .even = (unsigned long)addr, .odd = 0 };
asm_inline volatile(
- " diag %[r1],%[subcode],0x308\n"
- "0:\n"
- EX_TABLE(0b, 0b)
+ "0: diag %[r1],%[subcode],0x308\n"
+ "1:\n"
+ EX_TABLE_INSN(0b, 1b)
: [r1] "+d" (r1.pair)
: [subcode] "d" (subcode)
: "cc", "memory");
diff --git a/arch/s390/boot/physmem_info.c b/arch/s390/boot/physmem_info.c
index 0ebb2174713f..e5248b637326 100644
--- a/arch/s390/boot/physmem_info.c
+++ b/arch/s390/boot/physmem_info.c
@@ -68,11 +68,11 @@ static int __diag260(unsigned long rx1, unsigned long rx2)
ry = 0x10; /* storage configuration */
exception = 1;
asm_inline volatile(
- " diag %[rx],%[ry],0x260\n"
- "0: lhi %[exc],0\n"
+ "0: diag %[rx],%[ry],0x260\n"
+ " lhi %[exc],0\n"
"1:\n"
CC_IPM(cc)
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: CC_OUT(cc, cc), [exc] "+d" (exception), [ry] "+d" (ry)
: [rx] "d" (rx.pair)
: CC_CLOBBER_LIST("memory"));
@@ -108,9 +108,9 @@ static int diag500_storage_limit(unsigned long *max_physmem_end)
asm_inline volatile(
" lghi %%r1,%[subcode]\n"
" lghi %%r2,0\n"
- " diag %%r2,%%r4,0x500\n"
- "0: lgr %[slimit],%%r2\n"
- EX_TABLE(0b, 0b)
+ "0: diag %%r2,%%r4,0x500\n"
+ "1: lgr %[slimit],%%r2\n"
+ EX_TABLE_INSN(0b, 1b)
: [slimit] "=d" (storage_limit)
: [subcode] "i" (DIAG500_SC_STOR_LIMIT)
: "memory", "1", "2");
@@ -127,11 +127,11 @@ static int tprot(unsigned long addr)
exception = 1;
asm_inline volatile(
- " tprot 0(%[addr]),0\n"
- "0: lhi %[exc],0\n"
+ "0: tprot 0(%[addr]),0\n"
+ " lhi %[exc],0\n"
"1:\n"
CC_IPM(cc)
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: CC_OUT(cc, cc), [exc] "+d" (exception)
: [addr] "a" (addr)
: CC_CLOBBER_LIST("memory"));
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index c1dcf8b1b579..5eb7a3e1f9f1 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -89,10 +89,10 @@ static void detect_diag9c(void)
cpu = stap();
asm_inline volatile(
- " diag %[cpu],%%r0,0x9c\n"
- "0: lhi %[rc],0\n"
+ "0: diag %[cpu],%%r0,0x9c\n"
+ " lhi %[rc],0\n"
"1:\n"
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: [rc] "+d" (rc)
: [cpu] "d" (cpu)
: "cc", "memory");
@@ -150,10 +150,10 @@ static int cmma_test_essa(void)
/* Test ESSA_GET_STATE */
asm_inline volatile(
- " .insn rrf,0xb9ab0000,%[tmp],%[tmp],%[cmd],0\n"
- "0: lhi %[rc],0\n"
+ "0: .insn rrf,0xb9ab0000,%[tmp],%[tmp],%[cmd],0\n"
+ " lhi %[rc],0\n"
"1:\n"
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: [rc] "+d" (rc), [tmp] "+d" (tmp)
: [cmd] "i" (ESSA_GET_STATE)
: "cc", "memory");
--
2.53.0