Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v3 0/4] s390: Enable Rust support and add required arch glue
@ 2026-05-21 16:56 Jan Polensky
  2026-05-21 16:56 ` [PATCH v3 1/4] s390/bug: Provide ARCH_WARN_ASM for Rust WARN/BUG support Jan Polensky
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Jan Polensky @ 2026-05-21 16:56 UTC (permalink / raw)
  To: hca, gor, agordeev, ojeda, peterz, jpoimboe, jbaron, aliceryhl
  Cc: borntraeger, svens, boqun, gary, bjorn3_gh, lossin, a.hindborg,
	tmgross, dakr, rostedt, ardb, linux-s390, rust-for-linux,
	linux-kernel

Rust support on s390 requires a small set of architecture-specific pieces
before the generic Rust kernel infrastructure can be used.

The series wires up s390 as a Rust-capable 64-bit architecture, adds the
missing assembly interfaces needed by Rust for WARN/BUG reporting and for
static branches, and adjusts bindgen parameters to avoid repr layout
conflicts caused by packed and aligned s390 structures.

s390 currently requires a rustc due to -Zpacked-stack, and the
minimum tool version gating is adjusted accordingly.

Link: https://github.com/Rust-for-Linux/linux/issues/2

Tested against: rustc 1.96.0-beta.7 (6be5f81e1 2026-05-17)

Changes since v2:
- mflags: cleanup (thanks Gary)
Changes since v1:
- strip the -nightly suffix in min-tool-version.sh (thanks miguel and alice)
- ARCH_JUMP_TABLE_ENTRY() moved up to align comments properly (thanks Gary)
- removed MONCODE_BUG to prevent 0U in non-C context in assembler (noted by Sashiko - AI)
- prevent environment pollution by explicit initialization mflag := (noted by Sashiko - AI)


Jan Polensky (4):
  s390/bug: Provide ARCH_WARN_ASM for Rust WARN/BUG support
  s390/jump_label: Implement ARCH_STATIC_BRANCH_JUMP_ASM and
    ARCH_STATIC_BRANCH_ASM macros
  rust/bindgen_parameters: Mark s390 types as opaque to prevent repr
    conflicts
  s390: Enable Rust support

 Documentation/rust/arch-support.rst |  1 +
 arch/s390/Kconfig                   |  1 +
 arch/s390/Makefile                  | 28 ++++++++++++++----------
 arch/s390/include/asm/bug.h         | 12 +++++++++++
 arch/s390/include/asm/jump_label.h  | 33 +++++++++++++++++------------
 rust/Makefile                       |  1 +
 rust/bindgen_parameters             |  7 ++++++
 scripts/generate_rust_target.rs     |  2 ++
 scripts/min-tool-version.sh         |  6 +++++-
 9 files changed, 65 insertions(+), 26 deletions(-)


base-commit: 758c807bb943138f887d42d986b645e12446ba9c
--
2.51.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2026-05-29 15:04 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 16:56 [PATCH v3 0/4] s390: Enable Rust support and add required arch glue Jan Polensky
2026-05-21 16:56 ` [PATCH v3 1/4] s390/bug: Provide ARCH_WARN_ASM for Rust WARN/BUG support Jan Polensky
2026-05-27 10:54   ` Gary Guo
2026-05-21 16:56 ` [PATCH v3 2/4] s390/jump_label: Implement ARCH_STATIC_BRANCH_JUMP_ASM and ARCH_STATIC_BRANCH_ASM macros Jan Polensky
2026-05-27  5:57   ` Alice Ryhl
2026-05-27 21:06     ` Jan Polensky
2026-05-27 10:54   ` Gary Guo
2026-05-21 16:56 ` [PATCH v3 3/4] rust/bindgen_parameters: Mark s390 types as opaque to prevent repr conflicts Jan Polensky
2026-05-21 16:56 ` [PATCH v3 4/4] s390: Enable Rust support Jan Polensky
2026-05-27  5:59   ` Alice Ryhl
2026-05-27  6:53     ` Heiko Carstens
2026-05-27  8:27       ` Miguel Ojeda
2026-05-26 13:55 ` [PATCH v3 0/4] s390: Enable Rust support and add required arch glue Miguel Ojeda
2026-05-26 16:13   ` Heiko Carstens
2026-05-27 10:08     ` Miguel Ojeda
2026-05-27 10:38       ` Alice Ryhl
2026-05-27 12:10         ` Miguel Ojeda
2026-05-27 13:44           ` Heiko Carstens
2026-05-27 15:25             ` Miguel Ojeda
2026-05-27 10:53       ` Gary Guo
2026-05-27 12:13         ` Miguel Ojeda
2026-05-27 11:54       ` Gary Guo
2026-05-27 13:37         ` Heiko Carstens
2026-05-28 14:03       ` Jan Polensky
2026-05-28 14:14         ` Gary Guo
2026-05-29 15:04           ` Jan Polensky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox