diff --git a/.github/workflows/kernel-ppc64le-debug.config b/.github/workflows/kernel-ppc64le-debug.config index 422786d731e82f..d211d9e79b575c 100644 --- a/.github/workflows/kernel-ppc64le-debug.config +++ b/.github/workflows/kernel-ppc64le-debug.config @@ -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 @@ -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 diff --git a/Documentation/rust/arch-support.rst b/Documentation/rust/arch-support.rst index d72ab2f8fa4692..a8952dd2e94dbb 100644 --- a/Documentation/rust/arch-support.rst +++ b/Documentation/rust/arch-support.rst @@ -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 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index acf4993baddc48..3f5924c1536871 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -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