Skip to content

Commit 9e6e67e

Browse files
authored
Merge pull request #192 from mpe/rust
Use RUST_OPT_LEVEL_0 for ppc64le CI and related changes
2 parents 30d13c6 + 61852d2 commit 9e6e67e

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ CONFIG_ILLEGAL_POINTER_VALUE=0x5deadbeef0000000
356356
# CONFIG_PPC_4K_PAGES is not set
357357
CONFIG_PPC_64K_PAGES=y
358358
CONFIG_PPC_PAGE_SHIFT=16
359-
CONFIG_THREAD_SHIFT=14
359+
CONFIG_THREAD_SHIFT=15
360360
CONFIG_DATA_SHIFT=16
361361
CONFIG_FORCE_MAX_ZONEORDER=9
362362
# CONFIG_PPC_SUBPAGE_PROT is not set
@@ -1581,8 +1581,8 @@ CONFIG_RUNTIME_TESTING_MENU=y
15811581
#
15821582
CONFIG_RUST_DEBUG_ASSERTIONS=y
15831583
CONFIG_RUST_OVERFLOW_CHECKS=y
1584-
CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
1585-
# CONFIG_RUST_OPT_LEVEL_0 is not set
1584+
# CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C is not set
1585+
CONFIG_RUST_OPT_LEVEL_0=y
15861586
# CONFIG_RUST_OPT_LEVEL_1 is not set
15871587
# CONFIG_RUST_OPT_LEVEL_2 is not set
15881588
# CONFIG_RUST_OPT_LEVEL_3 is not set

Documentation/rust/arch-support.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ support corresponds to ``S`` values in the ``MAINTAINERS`` file.
2626
- None
2727
* - ``powerpc``
2828
- Maintained
29-
- ``ppc64le`` only, ``RUST_OPT_LEVEL >= 2``
29+
- ``ppc64le`` only, ``RUST_OPT_LEVEL < 2`` requires ``CONFIG_THREAD_SHIFT=15``
3030
* - ``x86``
3131
- Maintained
3232
- ``x86_64`` only

lib/Kconfig.debug

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,12 +2607,18 @@ config RUST_OPT_LEVEL_0
26072607
directly). Use the corresponding configuration options to control
26082608
that instead, orthogonally.
26092609

2610+
Note this level may cause excessive stack usage, which can lead to stack
2611+
overflow and subsequent crashes.
2612+
26102613
config RUST_OPT_LEVEL_1
26112614
bool "Basic optimizations (-Copt-level=1)"
26122615
help
26132616
Useful for debugging without getting too lost, but without
26142617
the overhead and boilerplate of no optimizations at all.
26152618

2619+
Note this level may cause excessive stack usage, which can lead to stack
2620+
overflow and subsequent crashes.
2621+
26162622
config RUST_OPT_LEVEL_2
26172623
bool "Some optimizations (-Copt-level=2)"
26182624
help

0 commit comments

Comments
 (0)