mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] arm64: Don't truncate upper 32 bits in ENTRY_FUNCTION arg registers
@ 2021-09-16  9:33 Uwe Kleine-König
  2021-10-02  9:18 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2021-09-16  9:33 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

From: Ahmad Fatoum <ahmad@a3f.at>

Use a long instead of an u32. For 32-bit arm there is no difference, for
arm64 this results in being able to use the whole register size of 64
bits.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/arm/include/asm/barebox-arm.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 24f9bce2ef7a..cfb5943f33d6 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -162,18 +162,18 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
 }
 
 #define ENTRY_FUNCTION(name, arg0, arg1, arg2)				\
-	void name (uint32_t r0, uint32_t r1, uint32_t r2);		\
+	void name(ulong r0, ulong r1, ulong r2);			\
 									\
-	static void __##name(uint32_t, uint32_t, uint32_t);		\
+	static void __##name(ulong, ulong, ulong);			\
 									\
 	void NAKED __section(.text_head_entry_##name)	name		\
-				(uint32_t r0, uint32_t r1, uint32_t r2)	\
+				(ulong r0, ulong r1, ulong r2)		\
 		{							\
 			__barebox_arm_head();				\
 			__##name(r0, r1, r2);				\
 		}							\
 		static void NAKED noinline __##name			\
-			(uint32_t arg0, uint32_t arg1, uint32_t arg2)
+			(ulong arg0, ulong arg1, ulong arg2)
 
 /*
  * When using compressed images in conjunction with relocatable images

base-commit: c945d24ec5dad6910b02697e4d1df09f89d2b950
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: Don't truncate upper 32 bits in ENTRY_FUNCTION arg registers
  2021-09-16  9:33 [PATCH] arm64: Don't truncate upper 32 bits in ENTRY_FUNCTION arg registers Uwe Kleine-König
@ 2021-10-02  9:18 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-10-02  9:18 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox, Ahmad Fatoum

On Thu, Sep 16, 2021 at 11:33:56AM +0200, Uwe Kleine-König wrote:
> From: Ahmad Fatoum <ahmad@a3f.at>
> 
> Use a long instead of an u32. For 32-bit arm there is no difference, for
> arm64 this results in being able to use the whole register size of 64
> bits.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  arch/arm/include/asm/barebox-arm.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-02  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16  9:33 [PATCH] arm64: Don't truncate upper 32 bits in ENTRY_FUNCTION arg registers Uwe Kleine-König
2021-10-02  9:18 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox