[PATCH 47/78] ARM: Make some variables 64bit aware

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 16 05:53:23 PDT 2018


Use unsigned long as type for variables that are used as addresses.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/cpu/start-pbl.c  | 10 +++++-----
 arch/arm/cpu/uncompress.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index 73c27429da..25f91b02f3 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -48,10 +48,10 @@ extern void *input_data_end;
 __noreturn void barebox_single_pbl_start(unsigned long membase,
 		unsigned long memsize, void *boarddata)
 {
-	uint32_t offset;
-	uint32_t pg_start, pg_end, pg_len, uncompressed_len;
+	unsigned long offset;
+	unsigned long pg_start, pg_end, pg_len, uncompressed_len;
 	void __noreturn (*barebox)(unsigned long, unsigned long, void *);
-	uint32_t endmem = membase + memsize;
+	unsigned long endmem = membase + memsize;
 	unsigned long barebox_base;
 
 	if (IS_ENABLED(CONFIG_PBL_RELOCATABLE))
@@ -60,8 +60,8 @@ __noreturn void barebox_single_pbl_start(unsigned long membase,
 	/* Get offset between linked address and runtime address */
 	offset = get_runtime_offset();
 
-	pg_start = (uint32_t)&input_data + global_variable_offset();
-	pg_end = (uint32_t)&input_data_end + global_variable_offset();
+	pg_start = (unsigned long)&input_data + global_variable_offset();
+	pg_end = (unsigned long)&input_data_end + global_variable_offset();
 	pg_len = pg_end - pg_start;
 	uncompressed_len = get_unaligned((const u32 *)(pg_start + pg_len - 4));
 
diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c
index 37845b2259..c721eef0ad 100644
--- a/arch/arm/cpu/uncompress.c
+++ b/arch/arm/cpu/uncompress.c
@@ -45,7 +45,7 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase,
 {
 	uint32_t pg_len, uncompressed_len;
 	void __noreturn (*barebox)(unsigned long, unsigned long, void *);
-	uint32_t endmem = membase + memsize;
+	unsigned long endmem = membase + memsize;
 	unsigned long barebox_base;
 	uint32_t *image_end;
 	void *pg_start;
-- 
2.16.1




More information about the barebox mailing list