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 v2 4/7] ARM: asm: implement CPU_BE/CPU_LE
Date: Fri, 26 May 2023 08:37:43 +0200	[thread overview]
Message-ID: <20230526063746.1155297-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230526063746.1155297-1-a.fatoum@pengutronix.de>

This will be required for incoming SHA1/2 ARMv8 Crypto Extensions assembly
routines.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/include/asm/assembler.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 95c6768de89c..7f9281b9a1a1 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -111,3 +111,22 @@
 	.align	3;				\
 	.long	9999b,9001f;			\
 	.previous
+
+
+/*
+ * Select code when configured for BE.
+ */
+#ifdef CONFIG_CPU_BIG_ENDIAN
+#define CPU_BE(code...) code
+#else
+#define CPU_BE(code...)
+#endif
+
+/*
+ * Select code when configured for LE.
+ */
+#ifdef CONFIG_CPU_BIG_ENDIAN
+#define CPU_LE(code...)
+#else
+#define CPU_LE(code...) code
+#endif
-- 
2.39.2




  parent reply	other threads:[~2023-05-26  6:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  6:37 [PATCH v2 0/7] ARM64: crypto: add Crypto Extensions accelerated SHA implementation Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 1/7] crypto: digest: match driver name if no algo name matches Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 2/7] test: self: add digest test Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 3/7] include: sync <linux/linkage.h> with Linux Ahmad Fatoum
2023-05-26  6:54   ` Sascha Hauer
2023-05-26  7:45     ` Ahmad Fatoum
2023-05-26  6:37 ` Ahmad Fatoum [this message]
2023-05-26  6:37 ` [PATCH v2 5/7] ARM: asm: import Linux adr_l/ldr_l assembler.h definitions Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 6/7] crypto: sha: reorder struct sha*_state into Linux order Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 7/7] ARM64: crypto: add Crypto Extensions accelerated SHA implementation 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=20230526063746.1155297-5-a.fatoum@pengutronix.de \
    --to=a.fatoum@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