Skip to content

Commit 5caca32

Browse files
Alexander GordeevVasily Gorbik
authored andcommitted
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 <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 273cd17 commit 5caca32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/s390/kernel/cpcmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static int diag8_noresponse(int cmdlen)
2929
asm volatile(
3030
" diag %[rx],%[ry],0x8\n"
3131
: [ry] "+&d" (cmdlen)
32-
: [rx] "d" ((addr_t) cpcmd_buf)
32+
: [rx] "d" (__pa(cpcmd_buf))
3333
: "cc");
3434
return cmdlen;
3535
}
@@ -39,8 +39,8 @@ static int diag8_response(int cmdlen, char *response, int *rlen)
3939
union register_pair rx, ry;
4040
int cc;
4141

42-
rx.even = (addr_t) cpcmd_buf;
43-
rx.odd = (addr_t) response;
42+
rx.even = __pa(cpcmd_buf);
43+
rx.odd = __pa(response);
4444
ry.even = cmdlen | 0x40000000L;
4545
ry.odd = *rlen;
4646
asm volatile(

0 commit comments

Comments
 (0)