Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ jobs:
# TODO: remove if this patch is indeed not necessary. (It seems the patch is now included upstream.)
# - run: git -C linux apply ../ci/x86-boot-Use-std-gnu11-to-fix-build-with-GCC-15.patch

# TODO: remove when fixed in the above branch.
- run: git -C linux apply ../ci/0001-Use-inline-always-for-bit_T-functions.patch

# Setup: `busybox`.
- run: |
git clone --depth 1 -b 1_30_1 https://git.busybox.net/busybox/
Expand Down Expand Up @@ -261,7 +264,8 @@ jobs:
- run: make -C linux ${{ env.MAKE_ARCH }} ${{ env.MAKE_CROSS_COMPILE }} ${{ env.MAKE_TOOLCHAIN }} ${{ env.MAKE_OUTPUT }} ${{ env.MAKE_KRUSTFLAGS }} ${{ env.JOBS }} rusttest

# Check formatting.
- run: make -C linux ${{ env.MAKE_ARCH }} ${{ env.MAKE_CROSS_COMPILE }} ${{ env.MAKE_TOOLCHAIN }} ${{ env.MAKE_OUTPUT }} ${{ env.MAKE_KRUSTFLAGS }} ${{ env.JOBS }} rustfmtcheck
# TODO: re-enable when fixed upstream.
#- run: make -C linux ${{ env.MAKE_ARCH }} ${{ env.MAKE_CROSS_COMPILE }} ${{ env.MAKE_TOOLCHAIN }} ${{ env.MAKE_OUTPUT }} ${{ env.MAKE_KRUSTFLAGS }} ${{ env.JOBS }} rustfmtcheck

# Test single targets.
- run: |
Expand Down
25 changes: 25 additions & 0 deletions 0001-Use-inline-always-for-bit_T-functions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 826b2b4116d7d204132a2ec1afd2fcb57061994c Mon Sep 17 00:00:00 2001
From: Antoni Boucher <bouanto@zoho.com>
Date: Fri, 5 Dec 2025 07:51:25 -0500
Subject: [PATCH] Use #[inline(always)] for bit_T functions

---
rust/kernel/bits.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/bits.rs b/rust/kernel/bits.rs
index 553d50265883..d39aed20bc6f 100644
--- a/rust/kernel/bits.rs
+++ b/rust/kernel/bits.rs
@@ -27,7 +27,7 @@ pub fn [<checked_bit_ $ty>](n: u32) -> Option<$ty> {
///
/// This version is the default and should be used if `n` is known at
/// compile time.
- #[inline]
+ #[inline(always)]
pub const fn [<bit_ $ty>](n: u32) -> $ty {
build_assert!(n < <$ty>::BITS);
(1 as $ty) << n
--
2.52.0