Skip to content

Commit 5f37add

Browse files
committed
rust: add per-arch HAVE_RUST kernel option
Suggested-by: Russell King (Oracle) <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 05e2c2f commit 5f37add

File tree

7 files changed

+12
-1
lines changed

7 files changed

+12
-1
lines changed

arch/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ config HAVE_RSEQ
339339
This symbol should be selected by an architecture if it
340340
supports an implementation of restartable sequences.
341341

342+
config HAVE_RUST
343+
bool
344+
help
345+
This symbol should be selected by an architecture if it
346+
supports Rust.
347+
342348
config HAVE_FUNCTION_ARG_ACCESS_API
343349
bool
344350
help

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ config ARM
113113
select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE
114114
select HAVE_REGS_AND_STACK_ACCESS_API
115115
select HAVE_RSEQ
116+
select HAVE_RUST if CPU_32v6 || CPU_32v6K
116117
select HAVE_STACKPROTECTOR
117118
select HAVE_SYSCALL_TRACEPOINTS
118119
select HAVE_UID16

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ config ARM64
197197
select HAVE_FUNCTION_ARG_ACCESS_API
198198
select MMU_GATHER_RCU_TABLE_FREE
199199
select HAVE_RSEQ
200+
select HAVE_RUST
200201
select HAVE_STACKPROTECTOR
201202
select HAVE_SYSCALL_TRACEPOINTS
202203
select HAVE_KPROBES

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ config PPC
232232
select HAVE_REGS_AND_STACK_ACCESS_API
233233
select HAVE_RELIABLE_STACKTRACE
234234
select HAVE_RSEQ
235+
select HAVE_RUST if PPC64 && CPU_LITTLE_ENDIAN
235236
select HAVE_SETUP_PER_CPU_AREA if PPC64
236237
select HAVE_SOFTIRQ_ON_OWN_STACK
237238
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ config RISCV
9898
select HAVE_PERF_REGS
9999
select HAVE_PERF_USER_STACK_DUMP
100100
select HAVE_REGS_AND_STACK_ACCESS_API
101+
select HAVE_RUST if 64BIT
101102
select HAVE_FUNCTION_ARG_ACCESS_API
102103
select HAVE_STACKPROTECTOR
103104
select HAVE_SYSCALL_TRACEPOINTS

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ config X86
248248
select HAVE_STATIC_CALL_INLINE if HAVE_STACK_VALIDATION
249249
select HAVE_PREEMPT_DYNAMIC
250250
select HAVE_RSEQ
251+
select HAVE_RUST if X86_64
251252
select HAVE_SYSCALL_TRACEPOINTS
252253
select HAVE_UNSTABLE_SCHED_CLOCK
253254
select HAVE_USER_RETURN_NOTIFIER

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,8 +2055,8 @@ config PROFILING
20552055

20562056
config RUST
20572057
bool "Rust support"
2058+
depends on HAVE_RUST
20582059
depends on RUST_IS_AVAILABLE
2059-
depends on ARM64 || CPU_32v6 || CPU_32v6K || (PPC64 && CPU_LITTLE_ENDIAN) || X86_64 || RISCV
20602060
depends on !MODVERSIONS
20612061
depends on !GCC_PLUGIN_RANDSTRUCT
20622062
select CONSTRUCTORS

0 commit comments

Comments
 (0)