mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 6/8] ARM64: asm: drop __barebox_arm_head
Date: Mon, 24 Oct 2022 08:57:14 +0200	[thread overview]
Message-ID: <20221024065716.1215046-7-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20221024065716.1215046-1-a.fatoum@pengutronix.de>

Now that we have the common PBL head written in assembly, the 64-bit
inline assembly version remains unused. Drop it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/include/asm/barebox-arm-head.h         | 17 ++---------------
 .../mach-mvebu/include/mach/barebox-arm-head.h  | 17 -----------------
 2 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
index 099e1bef3cb8..1a1d58c1aa35 100644
--- a/arch/arm/include/asm/barebox-arm-head.h
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -18,13 +18,13 @@ void barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2);
 #define ARM_HEAD_SPARE_OFS	0x30
 #define ARM_HEAD_SPARE_MARKER	0x55555555
 
+#ifdef CONFIG_CPU_32
 #ifdef CONFIG_HAVE_MACH_ARM_HEAD
 #include <mach/barebox-arm-head.h>
 #else
 static inline void __barebox_arm_head(void)
 {
 	__asm__ __volatile__ (
-#ifdef CONFIG_CPU_32
 #ifdef CONFIG_THUMB2_BAREBOX
 		".arm\n"
 		"adr r9, 1f + 1\n"
@@ -44,32 +44,18 @@ static inline void __barebox_arm_head(void)
 		"1: b 1b\n"
 		"1: b 1b\n"
 		"1: b 1b\n"
-#endif
-#else
-		/* 5 instructions added by ENTRY_FUNCTION */
-		/* two instruction long function prologue */
-		/* only use if stack is initialized! */
-		"b 2f\n"
 #endif
 		".asciz \"barebox\"\n"
-#ifdef CONFIG_CPU_32
 		".word _text\n"				/* text base. If copied there,
 							 * barebox can skip relocation
 							 */
-#else
-		".word 0xffffffff\n"
-#endif
 		".word _barebox_image_size\n"		/* image size to copy */
 		".rept 8\n"
 		".word 0x55555555\n"
 		".endr\n"
 		"2:\n"
 #ifdef CONFIG_PBL_BREAK
-#ifdef CONFIG_CPU_V8
-		"brk #17\n"
-#else
 		"bkpt #17\n"
-#endif
 		"nop\n"
 #else
 		"nop\n"
@@ -85,6 +71,7 @@ static inline void barebox_arm_head(void)
 	);
 }
 #endif
+#endif
 
 #endif /* __ASSEMBLY__ */
 
diff --git a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
index 12f8cfc5a029..2ef3377402f1 100644
--- a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
+++ b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
@@ -6,7 +6,6 @@
 static inline void __barebox_arm_head(void)
 {
 	__asm__ __volatile__ (
-#ifdef CONFIG_CPU_32
 #ifdef CONFIG_THUMB2_BAREBOX
 		".arm\n"
 		"adr r9, 1f + 1\n"
@@ -26,23 +25,11 @@ static inline void __barebox_arm_head(void)
 		"1: b 1b\n"
 		"1: b 1b\n"
 		"1: b 1b\n"
-#endif
-#else
-		"b 2f\n"
-		"nop\n"
-		"nop\n"
-		"nop\n"
-		"nop\n"
-		"nop\n"
 #endif
 		".asciz \"barebox\"\n"
-#ifdef CONFIG_CPU_32
 		".word _text\n"				/* text base. If copied there,
 							 * barebox can skip relocation
 							 */
-#else
-		".word 0xffffffff\n"
-#endif
 		".word _barebox_image_size\n"		/* image size to copy */
 
 		/*
@@ -58,11 +45,7 @@ static inline void __barebox_arm_head(void)
 		".endr\n"
 		"2:\n"
 #ifdef CONFIG_PBL_BREAK
-#ifdef CONFIG_CPU_V8
-		"brk #17\n"
-#else
 		"bkpt #17\n"
-#endif
 		"nop\n"
 #else
 		"nop\n"
-- 
2.30.2




  parent reply	other threads:[~2022-10-24  6:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  6:57 [PATCH 0/8] ARM64: rewrite ENTRY_FUNCTION_WITHSTACK in assembly Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 1/8] ARM64: cpu: select HAVE_PBL_MULTI_IMAGES globally Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 2/8] ARM64: asm: define ENTRY_FUNCTION in terms of ENTRY_FUNCTION_WITHSTACK Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 3/8] pbl: have linker define __pbl_board_entry alias Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 4/8] asm-generic: memory_layout: define __keep_symbolref() Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 5/8] ARM64: asm: rewrite ENTRY_FUNCTION(_WITHSTACK) fully in assembly Ahmad Fatoum
2022-10-24  8:55   ` Sascha Hauer
2022-10-24 10:02     ` Ahmad Fatoum
2022-10-24 12:11   ` [PATCH] fixup! " Ahmad Fatoum
2022-10-24  6:57 ` Ahmad Fatoum [this message]
2022-10-24  6:57 ` [PATCH 7/8] ARM: asm: cleanup 32-bit entry points Ahmad Fatoum
2022-10-24  6:57 ` [PATCH 8/8] Documentation: devel: porting: bring it up-to-date Ahmad Fatoum

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=20221024065716.1215046-7-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --subject='Re: [PATCH 6/8] ARM64: asm: drop __barebox_arm_head' \
    /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

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