mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 01/13] ARM: add ENTRY_FUNCTION_HEAD macro
Date: Thu,  2 Mar 2023 12:15:54 +0100	[thread overview]
Message-ID: <20230302111606.1054037-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20230302111606.1054037-1-s.hauer@pengutronix.de>

Some architectures set CONFIG_HAVE_MACH_ARM_HEAD to customize the
barebox image header. Add a ENTRY_FUNCTION_HEAD macro which allows
a board to customize the barebox image header without having to
hook into a generic include file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/include/asm/barebox-arm.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index d4be719bc4..0cf4549cd7 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -183,7 +183,7 @@ void __barebox_arm64_head(ulong x0, ulong x1, ulong x2);
 	static void noinline ____##name					\
 		(ulong arg0, ulong arg1, ulong arg2)
 
-#define ENTRY_FUNCTION(name, arg0, arg1, arg2)				\
+#define ENTRY_FUNCTION_HEAD(name, head, arg0, arg1, arg2)		\
 	void name(ulong r0, ulong r1, ulong r2);			\
 									\
 	static void __##name(ulong, ulong, ulong);			\
@@ -191,11 +191,14 @@ void __barebox_arm64_head(ulong x0, ulong x1, ulong x2);
 	void __naked __section(.text_head_entry_##name)	name		\
 				(ulong r0, ulong r1, ulong r2)		\
 		{							\
-			__barebox_arm_head();				\
+			head();				\
 			__##name(r0, r1, r2);				\
 		}							\
 	static void __naked noinline __##name				\
 		(ulong arg0, ulong arg1, ulong arg2)
+
+#define ENTRY_FUNCTION(name, arg0, arg1, arg2)		\
+		ENTRY_FUNCTION_HEAD(name, __barebox_arm_head, arg0, arg1, arg2)
 #endif
 
 /*
-- 
2.30.2




  reply	other threads:[~2023-03-02 11:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 11:15 [PATCH 00/13] ARM: misc cleanups Sascha Hauer
2023-03-02 11:15 ` Sascha Hauer [this message]
2023-03-02 11:15 ` [PATCH 02/13] ARM: mvebu: Use ENTRY_FUNCTION_HEAD Sascha Hauer
2023-03-02 11:15 ` [PATCH 03/13] ARM: at91: " Sascha Hauer
2023-03-02 16:40   ` Ahmad Fatoum
2023-03-03  8:32     ` Sascha Hauer
2023-03-02 11:15 ` [PATCH 04/13] ARM: Drop HAVE_MACH_ARM_HEAD Sascha Hauer
2023-03-02 11:15 ` [PATCH 05/13] ARM: drop CONFIG_HAS_ASM_DEBUG_LL Sascha Hauer
2023-03-02 11:15 ` [PATCH 06/13] regulator: pfuze: remove unused include Sascha Hauer
2023-03-02 11:16 ` [PATCH 07/13] ARM: drop unused zynq code in Makefile Sascha Hauer
2023-03-02 11:16 ` [PATCH 08/13] ARM: drop unused mvebu " Sascha Hauer
2023-03-02 11:16 ` [PATCH 09/13] ARM: drop unused am35xx " Sascha Hauer
2023-03-02 11:16 ` [PATCH 10/13] ARM: Makefile: Drop board-y Sascha Hauer
2023-03-02 11:16 ` [PATCH 11/13] ARM: i.MX: Add missing include Sascha Hauer
2023-03-02 11:16 ` [PATCH 12/13] ARM: stm32mp_defconfig: Enable remaining boards Sascha Hauer
2023-03-02 11:16 ` [PATCH 13/13] mci: imx-esdhc-pbl: add missing include Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230302111606.1054037-2-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox