- Update s390x_vr_IS_VMALLOC_ADDR() to include a non-zero vmalloc_start
  check, making it consistent with s390x_generic_IS_VMALLOC_ADDR().
- Remove redundant vmalloc_start check from s390x_kvtop().

Signed-off-by: Mikhail Zaslonko <[email protected]>
---
 s390x.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/s390x.c b/s390x.c
index 0e8e2b3..25dca5e 100644
--- a/s390x.c
+++ b/s390x.c
@@ -724,13 +724,13 @@ static ulong s390x_vr_PTOV(ulong paddr)
 {
        return paddr + machdep->identity_map_base;
 }
 
 static int s390x_vr_IS_VMALLOC_ADDR(ulong vaddr)
 {
-       return (vaddr >= vt->vmalloc_start && vaddr < machdep->kvbase);
+       return (vt->vmalloc_start && vaddr >= vt->vmalloc_start && vaddr < 
machdep->kvbase);
 }
 
 ulong s390x_VTOP(ulong vaddr)
 {
        return machdep->machspec->virt_to_phys(vaddr);
 }
@@ -943,17 +943,12 @@ s390x_kvtop(struct task_context *tc, ulong vaddr, 
physaddr_t *paddr, int verbose
 
        if (!IS_KVADDR(vaddr)){
                *paddr = 0;
                return FALSE;
        }
 
-       if (!vt->vmalloc_start) {
-              *paddr = VTOP(vaddr);
-              return TRUE;
-       }
-
        if (!IS_VMALLOC_ADDR(vaddr)) {
               *paddr = VTOP(vaddr);
               return TRUE;
        }
 
        pgd_base = (unsigned long)vt->kernel_pgd[0];
-- 
2.49.0
--
Crash-utility mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to