From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: barebox@lists.infradead.org
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH 2/5] ARM: at91: Merge sama5_boot_xload() asm code
Date: Tue, 18 Mar 2025 10:43:24 +0300 [thread overview]
Message-ID: <20250318074327.37730-2-eagle.alexander923@gmail.com> (raw)
In-Reply-To: <20250318074327.37730-1-eagle.alexander923@gmail.com>
This merges the sama5_boot_xload() assembler code to prevent
the r4 register from being used in the second line of asm volatile().
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
include/mach/at91/sama5_bootsource.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/mach/at91/sama5_bootsource.h b/include/mach/at91/sama5_bootsource.h
index 2fb65ce10f..aeda1b4114 100644
--- a/include/mach/at91/sama5_bootsource.h
+++ b/include/mach/at91/sama5_bootsource.h
@@ -56,8 +56,13 @@ extern unsigned long at91_bootsource;
static inline void __noreturn sama5_boot_xload(void __noreturn (*bb)(void), u32 r4)
{
- asm volatile("mov r4, %0" : : "r"(r4) : );
- asm volatile("bx %0" : : "r"(bb) : );
+ asm volatile (
+ "mov r4, %0\n"
+ "bx %1\n"
+ :
+ : "r"(r4), "r"(bb)
+ : "r4"
+ );
__builtin_unreachable();
}
--
2.39.1
next prev parent reply other threads:[~2025-03-18 7:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 7:43 [PATCH 1/5] ARM: at91: Add PBL_BREAK support Alexander Shiyan
2025-03-18 7:43 ` Alexander Shiyan [this message]
2025-03-18 7:43 ` [PATCH 3/5] ARM: at91: Rename xload-mmc.c Alexander Shiyan
2025-03-18 7:43 ` [PATCH 4/5] ARM: at91: sama5: Unify xx_start_image() calls Alexander Shiyan
2025-03-18 10:55 ` Sascha Hauer
2025-03-18 11:49 ` Alexander Shiyan
2025-03-18 7:43 ` [PATCH 5/5] ARM: at91: sama5d2: Add QSPI boot support Alexander Shiyan
2025-03-18 14:49 ` (subset) [PATCH 1/5] ARM: at91: Add PBL_BREAK support 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=20250318074327.37730-2-eagle.alexander923@gmail.com \
--to=eagle.alexander923@gmail.com \
--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