[PATCH] MIPS: use more consistent type for memory size values
Denis Orlov
denorl2009 at gmail.com
Sun Jun 23 13:46:53 PDT 2024
Switch from using u32 to unsigned long for these. It is unlikely to be
actually utilized on 64-bit builds, but this feels a bit safer,
considering that we work with the whole register width (32 or 64 bit,
depending on the config setting) for the corresponding value on the
assembly side.
Signed-off-by: Denis Orlov <denorl2009 at gmail.com>
---
arch/mips/boot/uncompress.c | 6 +++---
arch/mips/lib/reloc.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/boot/uncompress.c b/arch/mips/boot/uncompress.c
index 9344679a6b..0630d03c6b 100644
--- a/arch/mips/boot/uncompress.c
+++ b/arch/mips/boot/uncompress.c
@@ -19,14 +19,14 @@ extern void *input_data_end;
unsigned long free_mem_ptr;
unsigned long free_mem_end_ptr;
-void barebox_pbl_start(void *fdt, void *fdt_end, u32 ram_size);
+void barebox_pbl_start(void *fdt, void *fdt_end, unsigned long ram_size);
void __section(.text_entry) barebox_pbl_start(void *fdt, void *fdt_end,
- u32 ram_size)
+ unsigned long ram_size)
{
u32 piggy_len, fdt_len;
void *fdt_new;
- void (*barebox)(void *fdt, u32 ram_size);
+ void (*barebox)(void *fdt, unsigned long ram_size);
puts_ll("barebox_pbl_start()\n");
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index ec351b66f7..be8267a0bb 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -41,7 +41,7 @@
#include <asm-generic/memory_layout.h>
void main_entry(void *fdt);
-void __noreturn relocate_code(void *fdt, u32 relocaddr);
+void __noreturn relocate_code(void *fdt, unsigned long ram_size);
/**
* read_uint() - Read an unsigned integer from the buffer
@@ -106,7 +106,7 @@ static void apply_reloc(unsigned int type, void *addr, long off)
}
}
-void __noreturn relocate_code(void *fdt, u32 ram_size)
+void __noreturn relocate_code(void *fdt, unsigned long ram_size)
{
unsigned long addr, length, bss_len, relocaddr, new_stack;
uint8_t *buf;
--
2.45.2
More information about the barebox
mailing list