提交 5a4e0f58 编写于 作者: H Heiko Carstens 提交者: Vasily Gorbik

s390/ipl: use register pair instead of register asm

Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
上级 da905757
...@@ -162,16 +162,18 @@ static bool reipl_ccw_clear; ...@@ -162,16 +162,18 @@ static bool reipl_ccw_clear;
static inline int __diag308(unsigned long subcode, void *addr) static inline int __diag308(unsigned long subcode, void *addr)
{ {
register unsigned long _addr asm("0") = (unsigned long) addr; union register_pair r1;
register unsigned long _rc asm("1") = 0;
r1.even = (unsigned long) addr;
r1.odd = 0;
asm volatile( asm volatile(
" diag %0,%2,0x308\n" " diag %[r1],%[subcode],0x308\n"
"0: nopr %%r7\n" "0: nopr %%r7\n"
EX_TABLE(0b,0b) EX_TABLE(0b,0b)
: "+d" (_addr), "+d" (_rc) : [r1] "+&d" (r1.pair)
: "d" (subcode) : "cc", "memory"); : [subcode] "d" (subcode)
return _rc; : "cc", "memory");
return r1.odd;
} }
int diag308(unsigned long subcode, void *addr) int diag308(unsigned long subcode, void *addr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册