mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 09:31:50 +00:00
s390/sysinfo: get rid of register asm
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
53c1c2504b
commit
5fe29839de
@ -25,19 +25,22 @@ int topology_max_mnest;
|
||||
|
||||
static inline int __stsi(void *sysinfo, int fc, int sel1, int sel2, int *lvl)
|
||||
{
|
||||
register int r0 asm("0") = (fc << 28) | sel1;
|
||||
register int r1 asm("1") = sel2;
|
||||
int r0 = (fc << 28) | sel1;
|
||||
int rc = 0;
|
||||
|
||||
asm volatile(
|
||||
" stsi 0(%3)\n"
|
||||
" lr 0,%[r0]\n"
|
||||
" lr 1,%[r1]\n"
|
||||
" stsi 0(%[sysinfo])\n"
|
||||
"0: jz 2f\n"
|
||||
"1: lhi %1,%4\n"
|
||||
"2:\n"
|
||||
"1: lhi %[rc],%[retval]\n"
|
||||
"2: lr %[r0],0\n"
|
||||
EX_TABLE(0b, 1b)
|
||||
: "+d" (r0), "+d" (rc)
|
||||
: "d" (r1), "a" (sysinfo), "K" (-EOPNOTSUPP)
|
||||
: "cc", "memory");
|
||||
: [r0] "+d" (r0), [rc] "+d" (rc)
|
||||
: [r1] "d" (sel2),
|
||||
[sysinfo] "a" (sysinfo),
|
||||
[retval] "K" (-EOPNOTSUPP)
|
||||
: "cc", "0", "1", "memory");
|
||||
*lvl = ((unsigned int) r0) >> 28;
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user