Skip to content

Commit 78e2b26

Browse files
authored
Merge pull request torvalds#692 from ojeda/hostprogs
kbuild: support host programs written in Rust
2 parents 4fc14d4 + 046d82f commit 78e2b26

26 files changed

+141
-21
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,5 +405,8 @@ jobs:
405405
grep -F '.text' ${{ env.BUILD_DIR }}samples/rust/rust_minimal.s
406406
grep -F '; ModuleID' ${{ env.BUILD_DIR }}samples/rust/rust_minimal.ll
407407
408+
# Rust host programs
409+
- run: ${{ env.BUILD_DIR }}samples/rust/hostprogs/single | grep -F 'The number is 42.'
410+
408411
# View changes to ccache
409412
- run: ccache -s

.github/workflows/kernel-arm-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
17801780
CONFIG_SAMPLE_RUST_SEMAPHORE=m
17811781
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
17821782
CONFIG_SAMPLE_RUST_RANDOM=m
1783+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
17831784
# CONFIG_STRICT_DEVMEM is not set
17841785

17851786
#

.github/workflows/kernel-arm-release.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
17041704
CONFIG_SAMPLE_RUST_SEMAPHORE=m
17051705
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
17061706
CONFIG_SAMPLE_RUST_RANDOM=m
1707+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
17071708
# CONFIG_STRICT_DEVMEM is not set
17081709

17091710
#

.github/workflows/kernel-arm64-debug-thinlto.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
14371437
CONFIG_SAMPLE_RUST_SEMAPHORE=m
14381438
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14391439
CONFIG_SAMPLE_RUST_RANDOM=m
1440+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
14401441

14411442
#
14421443
# arm64 Debugging

.github/workflows/kernel-arm64-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
14321432
CONFIG_SAMPLE_RUST_SEMAPHORE=m
14331433
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14341434
CONFIG_SAMPLE_RUST_RANDOM=m
1435+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
14351436

14361437
#
14371438
# arm64 Debugging

.github/workflows/kernel-arm64-release-thinlto.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,6 +1355,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
13551355
CONFIG_SAMPLE_RUST_SEMAPHORE=m
13561356
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
13571357
CONFIG_SAMPLE_RUST_RANDOM=m
1358+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
13581359

13591360
#
13601361
# arm64 Debugging

.github/workflows/kernel-arm64-release.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
13501350
CONFIG_SAMPLE_RUST_SEMAPHORE=m
13511351
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
13521352
CONFIG_SAMPLE_RUST_RANDOM=m
1353+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
13531354

13541355
#
13551356
# arm64 Debugging

.github/workflows/kernel-ppc64le-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
14921492
CONFIG_SAMPLE_RUST_SEMAPHORE=m
14931493
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14941494
CONFIG_SAMPLE_RUST_RANDOM=m
1495+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
14951496
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
14961497
# CONFIG_STRICT_DEVMEM is not set
14971498

.github/workflows/kernel-ppc64le-release.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
14541454
CONFIG_SAMPLE_RUST_SEMAPHORE=m
14551455
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14561456
CONFIG_SAMPLE_RUST_RANDOM=m
1457+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
14571458
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
14581459
# CONFIG_STRICT_DEVMEM is not set
14591460

.github/workflows/kernel-riscv64-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,7 @@ CONFIG_SAMPLE_RUST_STACK_PROBING=m
12861286
CONFIG_SAMPLE_RUST_SEMAPHORE=m
12871287
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
12881288
CONFIG_SAMPLE_RUST_RANDOM=m
1289+
CONFIG_SAMPLE_RUST_HOSTPROGS=y
12891290
# CONFIG_STRICT_DEVMEM is not set
12901291

12911292
#

0 commit comments

Comments
 (0)