From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, arm@kernel.org
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH] ARM: makefile: use ARMv3M mode for RiscPC
Date: Tue, 2 Oct 2018 15:20:26 +0200 [thread overview]
Message-ID: <20181002132026.14931-1-Jason@zx2c4.com> (raw)
In-Reply-To: <CAKv+Gu8NXyfNAzk4Fe=J0QHEEV-txbRAoEcQmjG-6PgCyW5SZg@mail.gmail.com>
The purpose of CONFIG_CPU_32v3 is to avoid ldrh/strh on the RiscPC,
which is pretty much an ARMv4 device, except its bus will choke on the
half-words. The way to make the C compiler not output ldrh/strh is with
-march=armv3, which doesn't support them in the ISA. However, this
prevents certain cryptography code from working that uses instructions
like umull. Fortunately there's also -march=armv3m that does support
those, making it possible to continue assembling optimized cryptography
routines for our beloved RiscPC.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index d1516f85f25d..7fd4bcaf0721 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -74,7 +74,7 @@ endif
arch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
arch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t
arch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4
-arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3
+arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3m
# Evaluate arch cc-option calls now
arch-y := $(arch-y)
--
2.19.0
next prev parent reply other threads:[~2018-10-02 13:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-30 2:49 [PATCH] ARM: makefile: pass -march=armv4 to assembler even on CPU32v3 Jason A. Donenfeld
2018-10-01 15:13 ` Arnd Bergmann
2018-10-02 3:53 ` Jason A. Donenfeld
2018-10-02 5:39 ` Ard Biesheuvel
2018-10-02 7:51 ` Arnd Bergmann
2018-10-02 9:16 ` Ard Biesheuvel
2018-10-02 12:30 ` Jason A. Donenfeld
2018-10-02 13:10 ` Ard Biesheuvel
2018-10-02 13:12 ` Jason A. Donenfeld
2018-10-02 13:20 ` Jason A. Donenfeld [this message]
2018-10-02 13:28 ` [PATCH] ARM: makefile: use ARMv3M mode for RiscPC Ard Biesheuvel
2018-10-02 13:53 ` Arnd Bergmann
2018-10-02 14:02 ` Jason A. Donenfeld
2018-10-01 17:56 ` [PATCH] ARM: makefile: pass -march=armv4 to assembler even on CPU32v3 Russell King - ARM Linux
2018-10-01 18:10 ` Ard Biesheuvel
2018-10-01 18:13 ` Russell King - ARM Linux
2018-10-02 3:56 ` Jason A. Donenfeld
2018-10-02 4:08 ` Jason A. Donenfeld
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=20181002132026.14931-1-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=ard.biesheuvel@linaro.org \
--cc=arm@kernel.org \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).