diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2024-02-21 14:32:24 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2024-02-26 10:25:09 +0100 |
commit | 4394a50792346ec291d1bbde6da7571f799a6f12 (patch) | |
tree | 4df85948532b9a53c513863d5c0800fd50dbf67c /arch/s390/boot/startup.c | |
parent | s390/boot: sanitize kaslr_adjust_relocs() function prototype (diff) | |
download | linux-4394a50792346ec291d1bbde6da7571f799a6f12.tar.xz linux-4394a50792346ec291d1bbde6da7571f799a6f12.zip |
s390/boot: make type of __vmlinux_relocs_64_start|end consistent
Make the type of __vmlinux_relocs_64_start|end symbols as
char array, just like it is done for all other sections.
Function rescue_relocs() is simplified as result.
Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot/startup.c')
-rw-r--r-- | arch/s390/boot/startup.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index 09490ddd6973..d6709fd80fef 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -177,18 +177,16 @@ static void kaslr_adjust_got(unsigned long offset) {} static void rescue_relocs(void) {} static void free_relocs(void) {} #else -int *vmlinux_relocs_64_start; -int *vmlinux_relocs_64_end; +static int *vmlinux_relocs_64_start; +static int *vmlinux_relocs_64_end; static void rescue_relocs(void) { - unsigned long size, nrelocs; + unsigned long size = __vmlinux_relocs_64_end - __vmlinux_relocs_64_start; - nrelocs = __vmlinux_relocs_64_end - __vmlinux_relocs_64_start; - size = nrelocs * sizeof(uint32_t); vmlinux_relocs_64_start = (void *)physmem_alloc_top_down(RR_RELOC, size, 0); - memmove(vmlinux_relocs_64_start, (void *)__vmlinux_relocs_64_start, size); - vmlinux_relocs_64_end = vmlinux_relocs_64_start + nrelocs; + vmlinux_relocs_64_end = (void *)vmlinux_relocs_64_start + size; + memmove(vmlinux_relocs_64_start, __vmlinux_relocs_64_start, size); } static void free_relocs(void) |