Skip to content

Commit 9ef496d

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/boot: Convert __diag308() to extable
Shorten __diag308() and use regular EX_TABLE program check handling. Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 097cf5d commit 9ef496d

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

arch/s390/boot/ipl_parm.c

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,14 @@ int vmalloc_size_set;
3535

3636
static inline int __diag308(unsigned long subcode, void *addr)
3737
{
38-
unsigned long reg1, reg2;
39-
union register_pair r1;
40-
psw_t old;
38+
union register_pair r1 = { .even = (unsigned long)addr, .odd = 0 };
4139

42-
r1.even = (unsigned long) addr;
43-
r1.odd = 0;
4440
asm volatile(
45-
" mvc 0(16,%[psw_old]),0(%[psw_pgm])\n"
46-
" epsw %[reg1],%[reg2]\n"
47-
" st %[reg1],0(%[psw_pgm])\n"
48-
" st %[reg2],4(%[psw_pgm])\n"
49-
" larl %[reg1],1f\n"
50-
" stg %[reg1],8(%[psw_pgm])\n"
5141
" diag %[r1],%[subcode],0x308\n"
52-
"1: mvc 0(16,%[psw_pgm]),0(%[psw_old])\n"
53-
: [r1] "+&d" (r1.pair),
54-
[reg1] "=&d" (reg1),
55-
[reg2] "=&a" (reg2),
56-
"+Q" (get_lowcore()->program_new_psw),
57-
"=Q" (old)
58-
: [subcode] "d" (subcode),
59-
[psw_old] "a" (&old),
60-
[psw_pgm] "a" (&get_lowcore()->program_new_psw)
42+
"0:\n"
43+
EX_TABLE(0b, 0b)
44+
: [r1] "+d" (r1.pair)
45+
: [subcode] "d" (subcode)
6146
: "cc", "memory");
6247
return r1.odd;
6348
}

0 commit comments

Comments
 (0)