From: "Gary Guo" <gary@garyguo.net>
To: "Karl Mehltretter" <kmehltretter@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Miguel Ojeda" <ojeda@kernel.org>
Cc: "Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Arnd Bergmann" <arnd@arndb.de>,
"Linus Walleij" <linusw@kernel.org>,
"Christian Schrefl" <chrisi.schrefl@gmail.com>,
"Bradley Morgan" <brads@mainlining.org>,
"Paul E . McKenney" <paulmck@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
linux-arm-kernel@lists.infradead.org,
rust-for-linux@vger.kernel.org, llvm@lists.linux.dev,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/6] ARM: rust: Enable Rust support for ARMv4T
Date: Thu, 08 Oct 2026 11:08:52 +0200 [thread overview]
Message-ID: <DLZC7PFV4O75.VPMF8KDNW8JY@garyguo.net> (raw)
In-Reply-To: <20261008053746.49631-6-kmehltretter@gmail.com>
On Thu Oct 8, 2026 at 7:37 AM CEST, Karl Mehltretter wrote:
> The armv5te target emits clz and blx, which ARMv4T lacks. Kernels that
> contain an ARMv4T CPU are excluded from Rust for that reason.
>
> Nothing else in the Rust code depends on ARMv5. Use rustc's
> armv4t-unknown-linux-gnueabi target for these kernels. Like the C code,
> the Rust code of a combined ARMv4T and ARMv5 kernel is then built for
> ARMv4T.
>
> ARMv4 (StrongARM, FA526) stays excluded. It has no bx and rustc has no
> target for it.
>
> Tested in QEMU sx1 (OMAP310, ARM925T) with omap1_defconfig. The Rust
> samples, all Rust KUnit suites and the doctests pass with the current
> and with the minimum tool versions.
>
> at91_dt_defconfig combines ARMv4T and ARMv5 and is built for ARMv4T.
> That kernel passes the same tests on a Microchip SAM9X75 Curiosity
> board (ARM926EJ-S).
>
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---
> Documentation/rust/arch-support.rst | 8 ++++----
> arch/arm/Kconfig | 2 +-
> arch/arm/Makefile | 1 +
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/rust/arch-support.rst b/Documentation/rust/arch-support.rst
> index d6d1bef44c8f..3f39cf55b6f4 100644
> --- a/Documentation/rust/arch-support.rst
> +++ b/Documentation/rust/arch-support.rst
> @@ -12,15 +12,15 @@ which uses ``libclang``.
> Below is a general summary of architectures that currently work. Level of
> support corresponds to ``S`` values in the ``MAINTAINERS`` file.
>
> -============= ================ ==============================================
> +============= ================ ======================================================
> Architecture Level of support Constraints
> -============= ================ ==============================================
> -``arm`` Maintained ARMv5TE, ARMv6K and ARMv7, Little Endian only.
> +============= ================ ======================================================
> +``arm`` Maintained ARMv4T, ARMv5TE, ARMv6K and ARMv7, Little Endian only.
Can we say "ARMv4T or above" or something similar?
Best,
Gary
> ``arm64`` Maintained Little Endian only.
> ``loongarch`` Maintained \-
> ``riscv`` Maintained ``riscv64`` and LLVM/Clang only.
> ``s390`` Maintained ``CONFIG_EXPOLINE`` must be disabled.
> ``um`` Maintained \-
> ``x86`` Maintained ``x86_64`` only.
> -============= ================ ==============================================
> +============= ================ ======================================================
next prev parent reply other threads:[~2026-10-08 9:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 5:37 [PATCH v2 0/6] ARM: rust: Enable Rust support for ARMv4T, ARMv5TE and ARMv6K Karl Mehltretter
2026-10-08 5:37 ` [PATCH v2 1/6] ARM: cmpxchg: always inline __arch_xchg() and __cmpxchg() Karl Mehltretter
2026-10-08 9:01 ` Gary Guo
2026-10-09 1:17 ` Karl Mehltretter
2026-10-09 9:50 ` Gary Guo
2026-10-08 5:37 ` [PATCH v2 2/6] ARM: cmpxchg: support 2-byte xchg() on pre-ARMv6 CPUs Karl Mehltretter
2026-10-08 5:37 ` [PATCH v2 3/6] ARM: rust: Enable Rust support for ARMv6K-only kernels Karl Mehltretter
2026-10-08 5:37 ` [PATCH v2 4/6] ARM: rust: Enable Rust support for ARMv5TE Karl Mehltretter
2026-10-08 5:37 ` [PATCH v2 5/6] ARM: rust: Enable Rust support for ARMv4T Karl Mehltretter
2026-10-08 9:08 ` Gary Guo [this message]
2026-10-09 1:21 ` Karl Mehltretter
2026-10-08 5:37 ` [PATCH v2 6/6] ARM: rust: Build Rust code for ARMv7 on ARMv7 kernels Karl Mehltretter
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=DLZC7PFV4O75.VPMF8KDNW8JY@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=arnd@arndb.de \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=brads@mainlining.org \
--cc=chrisi.schrefl@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=justinstitt@google.com \
--cc=kmehltretter@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=llvm@lists.linux.dev \
--cc=lossin@kernel.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
--cc=paulmck@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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