s390/cpcmd: use physical address for command and response

Virtual Console Function DIAGNOSE 8 accepts physical
addresses of command and response strings.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Alexander Gordeev 2021-06-18 08:46:32 +02:00 committed by Vasily Gorbik
parent 273cd173a1
commit 5caca32fba

View File

@ -29,7 +29,7 @@ static int diag8_noresponse(int cmdlen)
asm volatile( asm volatile(
" diag %[rx],%[ry],0x8\n" " diag %[rx],%[ry],0x8\n"
: [ry] "+&d" (cmdlen) : [ry] "+&d" (cmdlen)
: [rx] "d" ((addr_t) cpcmd_buf) : [rx] "d" (__pa(cpcmd_buf))
: "cc"); : "cc");
return cmdlen; return cmdlen;
} }
@ -39,8 +39,8 @@ static int diag8_response(int cmdlen, char *response, int *rlen)
union register_pair rx, ry; union register_pair rx, ry;
int cc; int cc;
rx.even = (addr_t) cpcmd_buf; rx.even = __pa(cpcmd_buf);
rx.odd = (addr_t) response; rx.odd = __pa(response);
ry.even = cmdlen | 0x40000000L; ry.even = cmdlen | 0x40000000L;
ry.odd = *rlen; ry.odd = *rlen;
asm volatile( asm volatile(