diff options
author | Pingfan Liu <piliu@redhat.com> | 2022-01-18 15:48:09 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2022-01-24 10:00:30 +0100 |
commit | 67ea2d99e1356352034dc9d9c7b5ec6dd6b722eb (patch) | |
tree | 943f7b4162a77ca45252e90332727b65d1acb068 /util_lib | |
parent | 2e1ec106dc5aac951ba884ebe4cca036e9a2d45f (diff) |
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 <piliu@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'util_lib')
-rw-r--r-- | util_lib/elf_info.c | 2 | ||||
-rw-r--r-- | util_lib/include/elf_info.h | 2 |
2 files changed, 2 insertions, 2 deletions
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)); |