There's no way to enable paging mode on per-task basis. So, Check for per-task is redundant. Remove the x86_64_task_uses_5level() Signed-off-by: Dou Liyang <douly.fnst@xxxxxxxxxxxxxx> --- x86_64.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/x86_64.c b/x86_64.c index b07d6f2..96f685b 100644 --- a/x86_64.c +++ b/x86_64.c @@ -24,7 +24,6 @@ static int x86_64_uvtop(struct task_context *, ulong, physaddr_t *, int); static int x86_64_uvtop_level4(struct task_context *, ulong, physaddr_t *, int); static int x86_64_uvtop_level4_xen_wpt(struct task_context *, ulong, physaddr_t *, int); static int x86_64_uvtop_level4_rhel4_xen_wpt(struct task_context *, ulong, physaddr_t *, int); -static int x86_64_task_uses_5level(struct task_context *); static ulong x86_64_vmalloc_start(void); static int x86_64_is_task_addr(ulong); static int x86_64_verify_symbol(const char *, ulong, char); @@ -341,6 +340,7 @@ x86_64_init(int when) if (l5_enabled) machdep->flags |= VM_5LEVEL; } + if (machdep->flags & VM_5LEVEL) { machdep->machspec->userspace_top = USERSPACE_TOP_5LEVEL; machdep->machspec->page_offset = PAGE_OFFSET_5LEVEL; @@ -361,7 +361,6 @@ x86_64_init(int when) machdep->uvtop = x86_64_uvtop_level4; /* 5-level is optional per-task */ machdep->kvbase = (ulong)PAGE_OFFSET; machdep->identity_map_base = (ulong)PAGE_OFFSET; - } /* @@ -1915,7 +1914,7 @@ x86_64_uvtop_level4(struct task_context *tc, ulong uvaddr, physaddr_t *paddr, in goto no_upage; /* If the VM is in 5-level page table */ - if (machdep->flags & VM_5LEVEL && x86_64_task_uses_5level(tc)) { + if (machdep->flags & VM_5LEVEL) { ulong p4d_pte; /* * p4d = p4d_offset(pgd, address); @@ -1986,12 +1985,6 @@ no_upage: return FALSE; } -static int -x86_64_task_uses_5level(struct task_context *tc) -{ - return FALSE; -} - static int x86_64_uvtop_level4_xen_wpt(struct task_context *tc, ulong uvaddr, physaddr_t *paddr, int verbose) { -- 2.14.3 -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility