From: Nathan Chancellor <nathan@kernel.org>
To: Jan Polensky <japo@linux.ibm.com>
Cc: hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com,
ojeda@kernel.org, peterz@infradead.org, jpoimboe@kernel.org,
jbaron@akamai.com, aliceryhl@google.com,
borntraeger@linux.ibm.com, svens@linux.ibm.com, boqun@kernel.org,
gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, tmgross@umich.edu, dakr@kernel.org,
rostedt@goodmis.org, ardb@kernel.org, linux-s390@vger.kernel.org,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 6/6] s390: Enable Rust support
Date: Mon, 15 Jun 2026 12:40:13 -0400 [thread overview]
Message-ID: <20260615164013.GA249489@ax162> (raw)
In-Reply-To: <20260608181451.3734956-7-japo@linux.ibm.com>
Hi all,
On Mon, Jun 08, 2026 at 08:14:51PM +0200, Jan Polensky wrote:
> Enable building Rust code on s390 by wiring the architecture into the
> kernel Rust infrastructure.
>
> Add s390 to the Rust arch support documentation, provide the s390 Rust
> target and required compiler flags, and set the bindgen target for
> arch/s390. Adjust the Rust target generation and minimum rustc version
> gating so the s390 setup is handled explicitly.
>
> The Rust toolchain uses the "s390x" triple naming for the 64 bit target.
>
> Rust support is currently incompatible with CONFIG_EXPOLINE, which
> relies on compiler support for the -mindirect-branch= and
> -mfunction_return= options. Therefore, select HAVE_RUST only when
> EXPOLINE is disabled.
>
> Acked-by: Miguel Ojeda <ojeda@kernel.org>
> Acked-by: Heiko Carstens <hca@linux.ibm.com>
> Signed-off-by: Jan Polensky <japo@linux.ibm.com>
...
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index 297976b41088..8b712cd85fcd 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -35,25 +35,31 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
> KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
> KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_NO_ARRAY_BOUNDS),-Wno-array-bounds)
>
> +KBUILD_RUSTFLAGS += --target=s390x-unknown-none-softfloat -Zpacked-stack -Ctarget-feature=+backchain
With Rust 1.96.0, I see the following warning several times when
building Rust code in -next:
warning: unstable feature specified for `-Ctarget-feature`: `backchain`
|
= note: this feature is not stably supported; its behavior can change in the future
warning: 1 warning emitted
I assume this is expected? If so, is there a way to silence this warning?
--
Cheers,
Nathan
next prev parent reply other threads:[~2026-06-15 16:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 18:14 [PATCH v6 0/6] s390: Enable Rust support and add required arch glue Jan Polensky
2026-06-08 18:14 ` [PATCH v6 1/6] s390/bug: Provide ARCH_WARN_ASM for Rust WARN/BUG support Jan Polensky
2026-06-08 18:14 ` [PATCH v6 2/6] s390/jump_label: Implement ARCH_STATIC_BRANCH_JUMP_ASM and ARCH_STATIC_BRANCH_ASM macros Jan Polensky
2026-06-08 18:14 ` [PATCH v6 3/6] rust/bindgen_parameters: Mark s390 types as opaque to prevent repr conflicts Jan Polensky
2026-06-08 18:14 ` [PATCH v6 4/6] rust: helpers: Add memchr wrapper for string operations Jan Polensky
2026-06-08 18:14 ` [PATCH v6 5/6] s390/cmpxchg: Fix KASAN stack-out-of-bounds in atomic helpers Jan Polensky
2026-06-08 18:14 ` [PATCH v6 6/6] s390: Enable Rust support Jan Polensky
2026-06-08 18:25 ` Gary Guo
2026-06-08 19:45 ` Jan Polensky
2026-06-09 13:51 ` Alexander Gordeev
2026-06-09 14:00 ` Gary Guo
2026-06-15 16:40 ` Nathan Chancellor [this message]
2026-06-15 16:45 ` Miguel Ojeda
2026-06-16 3:04 ` Nathan Chancellor
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=20260615164013.GA249489@ax162 \
--to=nathan@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=aliceryhl@google.com \
--cc=ardb@kernel.org \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=borntraeger@linux.ibm.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=japo@linux.ibm.com \
--cc=jbaron@akamai.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=tmgross@umich.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.