Skip to content

Use RUST_OPT_LEVEL_0 for ppc64le CI and related changes #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2021
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: 3 additions & 3 deletions .github/workflows/kernel-ppc64le-debug.config
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ CONFIG_ILLEGAL_POINTER_VALUE=0x5deadbeef0000000
# CONFIG_PPC_4K_PAGES is not set
CONFIG_PPC_64K_PAGES=y
CONFIG_PPC_PAGE_SHIFT=16
CONFIG_THREAD_SHIFT=14
CONFIG_THREAD_SHIFT=15
CONFIG_DATA_SHIFT=16
CONFIG_FORCE_MAX_ZONEORDER=9
# CONFIG_PPC_SUBPAGE_PROT is not set
Expand Down Expand Up @@ -1581,8 +1581,8 @@ CONFIG_RUNTIME_TESTING_MENU=y
#
CONFIG_RUST_DEBUG_ASSERTIONS=y
CONFIG_RUST_OVERFLOW_CHECKS=y
CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y
# CONFIG_RUST_OPT_LEVEL_0 is not set
# CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C is not set
CONFIG_RUST_OPT_LEVEL_0=y
# CONFIG_RUST_OPT_LEVEL_1 is not set
# CONFIG_RUST_OPT_LEVEL_2 is not set
# CONFIG_RUST_OPT_LEVEL_3 is not set
Expand Down
2 changes: 1 addition & 1 deletion Documentation/rust/arch-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ support corresponds to ``S`` values in the ``MAINTAINERS`` file.
- None
* - ``powerpc``
- Maintained
- ``ppc64le`` only, ``RUST_OPT_LEVEL >= 2``
- ``ppc64le`` only, ``RUST_OPT_LEVEL < 2`` requires ``CONFIG_THREAD_SHIFT=15``
* - ``x86``
- Maintained
- ``x86_64`` only
6 changes: 6 additions & 0 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -2607,12 +2607,18 @@ config RUST_OPT_LEVEL_0
directly). Use the corresponding configuration options to control
that instead, orthogonally.

Note this level may cause excessive stack usage, which can lead to stack
overflow and subsequent crashes.

config RUST_OPT_LEVEL_1
bool "Basic optimizations (-Copt-level=1)"
help
Useful for debugging without getting too lost, but without
the overhead and boilerplate of no optimizations at all.

Note this level may cause excessive stack usage, which can lead to stack
overflow and subsequent crashes.

config RUST_OPT_LEVEL_2
bool "Some optimizations (-Copt-level=2)"
help
Expand Down