OSDN Git Service

s390/vmem: fix virtual vs physical address confusion
authorAlexander Gordeev <agordeev@linux.ibm.com>
Sat, 17 Jun 2023 20:04:26 +0000 (22:04 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 28 Jun 2023 11:57:08 +0000 (13:57 +0200)
Fix virtual vs physical address confusion (which currently are the same).

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

index 240950c..51cd5cc 100644 (file)
@@ -481,6 +481,7 @@ static int remove_pagetable(unsigned long start, unsigned long end, bool direct)
  */
 static int vmem_add_range(unsigned long start, unsigned long size)
 {
+       start = (unsigned long)__va(start);
        return add_pagetable(start, start + size, true);
 }
 
@@ -489,6 +490,7 @@ static int vmem_add_range(unsigned long start, unsigned long size)
  */
 static void vmem_remove_range(unsigned long start, unsigned long size)
 {
+       start = (unsigned long)__va(start);
        remove_pagetable(start, start + size, true);
 }