From d4e72fad43175bde99287b8efdece900e5b53444 Mon Sep 17 00:00:00 2001 From: Link Mauve Date: Fri, 10 Apr 2026 13:05:24 +0200 Subject: [PATCH 2/3] XXX: Enable asm_experimental_arch for PowerPC asm!() This is needed to compile the kernel crate, otherwise this error happens: error[E0658]: inline assembly is not stable yet on this architecture --> ../rust/kernel/sync/barrier.rs:19:14 | 19 | unsafe { core::arch::asm!("") }; | ^^^^^^^^^^^^^^^^^^^^ | = note: see issue #93335 for more information = help: add `#![feature(asm_experimental_arch)]` to the crate attributes to enable = note: this compiler was built on 2026-03-25; consider upgrading it if it is out of date error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. --- rust/kernel/lib.rs | 3 +++ scripts/Makefile.build | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index d93292d47420..92ccd47dc3ee 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -47,6 +47,9 @@ // To be determined. #![feature(used_with_arg)] // +// Needed for PowerPC inline assembly. +#![feature(asm_experimental_arch)] +// // `feature(derive_coerce_pointee)` is expected to become stable. Before Rust // 1.84.0, it did not exist, so enable the predecessor features. #![cfg_attr(CONFIG_RUSTC_HAS_COERCE_POINTEE, feature(derive_coerce_pointee))] diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 3652b85be545..c7cc21994c5a 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -321,7 +321,7 @@ $(obj)/%.lst: $(obj)/%.c FORCE # # Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on # the unstable features in use. -rust_allowed_features := asm_const,asm_goto,arbitrary_self_types,lint_reasons,offset_of_nested,raw_ref_op,slice_ptr_len,strict_provenance,used_with_arg +rust_allowed_features := asm_const,asm_goto,asm_experimental_arch,arbitrary_self_types,lint_reasons,offset_of_nested,raw_ref_op,slice_ptr_len,strict_provenance,used_with_arg # `--out-dir` is required to avoid temporaries being created by `rustc` in the # current working directory, which may be not accessible in the out-of-tree -- 2.54.0