mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
s390/diag: handle diag 204 subcode 4 address correctly
Diagnose 204 subcode 4 requires a real (physical) address, but a virtual address is passed to the inline assembly. Convert the address to a physical address for only this specific case. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
8cf57d7217
commit
c83cd4fe31
@ -109,6 +109,8 @@ enum diag204_sc {
|
||||
DIAG204_SUBC_STIB7 = 7
|
||||
};
|
||||
|
||||
#define DIAG204_SUBCODE_MASK 0xffff
|
||||
|
||||
/* The two available diag 204 data formats */
|
||||
enum diag204_format {
|
||||
DIAG204_INFO_SIMPLE = 0,
|
||||
|
@ -171,6 +171,8 @@ static inline int __diag204(unsigned long *subcode, unsigned long size, void *ad
|
||||
int diag204(unsigned long subcode, unsigned long size, void *addr)
|
||||
{
|
||||
diag_stat_inc(DIAG_STAT_X204);
|
||||
if ((subcode & DIAG204_SUBCODE_MASK) == DIAG204_SUBC_STIB4)
|
||||
addr = (void *)__pa(addr);
|
||||
size = __diag204(&subcode, size, addr);
|
||||
if (subcode)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user