From 67ea2d99e1356352034dc9d9c7b5ec6dd6b722eb Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Tue, 18 Jan 2022 15:48:09 +0800 Subject: arm64: make phys_offset signed After kernel commit 7bc1a0f9e176 ("arm64: mm: use single quantity to represent the PA to VA translation"), phys_offset can be negative if running 52-bits kernel on 48-bits hardware. So changing phys_offset from unsigned to signed. Signed-off-by: Pingfan Liu Reviewed-by: Philipp Rudo Signed-off-by: Simon Horman --- util_lib/elf_info.c | 2 +- util_lib/include/elf_info.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'util_lib') diff --git a/util_lib/elf_info.c b/util_lib/elf_info.c index 51d8b92..5574c7f 100644 --- a/util_lib/elf_info.c +++ b/util_lib/elf_info.c @@ -1236,7 +1236,7 @@ int read_elf(int fd) return 0; } -int read_phys_offset_elf_kcore(int fd, unsigned long *phys_off) +int read_phys_offset_elf_kcore(int fd, long *phys_off) { int ret; diff --git a/util_lib/include/elf_info.h b/util_lib/include/elf_info.h index 4bc9279..f550d86 100644 --- a/util_lib/include/elf_info.h +++ b/util_lib/include/elf_info.h @@ -28,7 +28,7 @@ int get_pt_load(int idx, unsigned long long *phys_end, unsigned long long *virt_start, unsigned long long *virt_end); -int read_phys_offset_elf_kcore(int fd, unsigned long *phys_off); +int read_phys_offset_elf_kcore(int fd, long *phys_off); int read_elf(int fd); void dump_dmesg(int fd, void (*handler)(char*, unsigned int)); -- cgit