>From kernel documentation: ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0 ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space So, it is only the module area which is lying above __START_KERNEL_map. However, kexec-tools only creates PT_LOAD segments for kernel text region and crash memory region. So, we can safely remove the check for !is_vmalloc_addr_x86_64() from get_phys_base_x86_64(). Since, this was the last usage of is_vmalloc_addr_x86_64(), so kill it as well. Signed-off-by: Pratyush Anand <panand at redhat.com> --- arch/x86_64.c | 14 +------------- makedumpfile.h | 3 +-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/arch/x86_64.c b/arch/x86_64.c index fe2764a8bec2..597cdac36dfc 100644 --- a/arch/x86_64.c +++ b/arch/x86_64.c @@ -21,17 +21,6 @@ extern struct vmap_pfns *gvmem_pfns; extern int nr_gvmem_pfns; -int -is_vmalloc_addr_x86_64(ulong vaddr) -{ - /* - * vmalloc, virtual memmap, and module space as VMALLOC space. - */ - return ((vaddr >= VMALLOC_START && vaddr <= VMALLOC_END) - || (vaddr >= VMEMMAP_START && vaddr <= VMEMMAP_END) - || (vaddr >= MODULES_VADDR && vaddr <= MODULES_END)); -} - static unsigned long get_xen_p2m_mfn(void) { @@ -75,8 +64,7 @@ get_phys_base_x86_64(void) info->phys_base = 0; /* default/traditional */ for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) { - if ((virt_start >= __START_KERNEL_map) && - !(is_vmalloc_addr_x86_64(virt_start))) { + if (virt_start >= __START_KERNEL_map) { info->phys_base = phys_start - (virt_start & ~(__START_KERNEL_map)); diff --git a/makedumpfile.h b/makedumpfile.h index 13559651feb6..8a96da1f61bd 100644 --- a/makedumpfile.h +++ b/makedumpfile.h @@ -859,7 +859,6 @@ unsigned long long vaddr_to_paddr_x86(unsigned long vaddr); #endif /* x86 */ #ifdef __x86_64__ -int is_vmalloc_addr_x86_64(ulong vaddr); int get_phys_base_x86_64(void); int get_machdep_info_x86_64(void); int get_versiondep_info_x86_64(void); @@ -869,7 +868,7 @@ unsigned long long vtop4_x86_64(unsigned long vaddr); #define get_machdep_info() get_machdep_info_x86_64() #define get_versiondep_info() get_versiondep_info_x86_64() #define vaddr_to_paddr(X) vtop4_x86_64(X) -#define is_phys_addr(X) (!is_vmalloc_addr_x86_64(X)) +#define is_phys_addr(X) stub_true_ul(X) #endif /* x86_64 */ #ifdef __powerpc64__ /* powerpc64 */ -- 2.7.4