Commit c83cd4fe authored by Heiko Carstens's avatar Heiko Carstens
Browse files

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: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 8cf57d72
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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,
+2 −0
Original line number Diff line number Diff line
@@ -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;