s390/extmem: fix virtual vs physical address confusion
authorAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 31 Jan 2024 08:30:36 +0000 (09:30 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 9 Feb 2024 12:58:16 +0000 (13:58 +0100)
Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/mm/extmem.c

index e41869f5cc95df0931bdab5d3c6b601c71b2de2c..282fefe107a246e0716892f1166706870a47a275 100644 (file)
@@ -136,7 +136,7 @@ dcss_diag(int *func, void *parameter,
        unsigned long rx, ry;
        int rc;
 
-       rx = (unsigned long) parameter;
+       rx = virt_to_phys(parameter);
        ry = (unsigned long) *func;
 
        diag_stat_inc(DIAG_STAT_X064);
@@ -178,7 +178,7 @@ query_segment_type (struct dcss_segment *seg)
 
        /* initialize diag input parameters */
        qin->qopcode = DCSS_FINDSEGA;
-       qin->qoutptr = (unsigned long) qout;
+       qin->qoutptr = virt_to_phys(qout);
        qin->qoutlen = sizeof(struct qout64);
        memcpy (qin->qname, seg->dcss_name, 8);