Skip to content

[PW_SID:1153959] optimize pgtable_l4|l5_enabled - #2552

Closed
linux-riscv-bot wants to merge 10 commits into
workflow__riscv__fixesfrom
pw1153959
Closed

[PW_SID:1153959] optimize pgtable_l4|l5_enabled#2552
linux-riscv-bot wants to merge 10 commits into
workflow__riscv__fixesfrom
pw1153959

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1153959 applied to workflow__riscv__fixes

Name: optimize pgtable_l4|l5_enabled
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1153959
Version: 1

ThreeBottleCap and others added 10 commits August 20, 2026 17:56
…_RWX

When CONFIG_STRICT_MODULE_RWX is not set, execmem cannot create
temporary writable mappings for read-only executable pages. In this
case, the execmem ranges must already have writable permissions.

Currently EXECMEM_KPROBES unconditionally uses PAGE_KERNEL_READ_EXEC,
which causes kprobe instruction slot writes to trigger page faults
on systems where CONFIG_STRICT_MODULE_RWX is not enabled.

Fix this by using PAGE_KERNEL_EXEC when CONFIG_STRICT_MODULE_RWX
is not available.

Signed-off-by: Xiaofeng Yuan <xiaofengmian@163.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://patch.msgid.link/20260814082742.148403-2-xiaofengmian@163.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
patch_map() always creates a temporary writable mapping via fixmap for
kernel text addresses, even when CONFIG_STRICT_KERNEL_RWX is disabled
and the kernel text is already mapped with _PAGE_WRITE.

This is unnecessary overhead at best, and on minimal configurations
it can cause page faults.

Skip the fixmap path for kernel text when CONFIG_STRICT_KERNEL_RWX
is not enabled, since the text pages are already writable in that case.
The module text path is already gated on CONFIG_STRICT_MODULE_RWX and
is kept unchanged.

Reported-by: Klara Modin <klara@kasm.eu>
Closes: https://lore.kernel.org/all/ant_8TaBbov_GS4i@soda.int.kasm.eu/
Reported-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Closes: https://lore.kernel.org/all/CA+V-a8tQK8rih9SGGTyqrEBGpNkx4H0eX2YccCRrgkVAPr+EBg@mail.gmail.com/
Tested-by: Klara Modin <klarasmodin@gmail.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/20260814082742.148403-3-xiaofengmian@163.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
This reverts commit 3033b2b.

The reverted patch is userspace-visible behavior change, not a bug fix.
The two variables here (pmm and pmlen) control two independent features:
pmm is the _hardware_ pointer masking mode that applies while executing
in userspace. pmlen is the shift amount that the _kernel_ uses when
untagging addresses; PMLEN_0 means no untagging occurs, so the kernel
does not accept tagged addresses in syscall arguments.

It is valid (as documented and tested by the self test) to enable
pointer masking without enabling the tagged address ABI. This separation
is necessary to allow userspace to create an execution environment
similar to what the kernel supports on arm64 by default, where TBI is
enabled but the tagged address ABI is not. (On arm64, there is no
equivalent to PR_PMLEN_MASK because TBI is always enabled.)

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://patch.msgid.link/20260820014551.1979772-1-samuel.holland@sifive.com
Cc: stable@vger.kernel.org
Fixes: 3033b2b ("riscv: Reset pmm when PR_TAGGED_ADDR_ENABLE is not set")
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Prefer the convenient string choice 'str_disabled_enabled()'
helper over hardcoded strings in 'setup_global_riscv_enable()'.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20260819160546.3219942-1-dmantipov@yandex.ru
Signed-off-by: Paul Walmsley <pjw@kernel.org>
The vendor-extension handlers reached from hwprobe_one_pair()
(hwprobe_isa_vendor_ext_thead_0() and friends) only OR the present bits
into pair->value via VENDOR_EXTENSION_SUPPORTED() and clear their own
missing bits; they assume the caller has already zeroed pair->value.

That holds for hwprobe_get_values() (it zeroes each pair) and
hwprobe_get_cpus() (it re-initializes its scratch pair per key), but not
for complete_hwprobe_vdso_data(), which reuses a single pair across all
keys without re-zeroing. A vendor key therefore inherits stale bits from
the previously probed key, and the wrong value is cached in the vDSO
all_cpu_hwprobe_values[] and handed to userspace on the fast patih.

Zero pair->value once at the top of hwprobe_one_pair() so every handler
starts from a clean value regardless of the caller, and drop the now
redundant zeroing in the *_BLOCK_SIZE cases. hwprobe_isa_ext0() keeps its
own zeroing because hwprobe_ext0_has() calls it directly, bypassing
hwprobe_one_pair().

Fixes: a5ea53d ("riscv: hwprobe: Add thead vendor extension probing")
Signed-off-by: Andy Chiu <tchiu@tenstorrent.com>
Reviewed-by: Jesse Taube <jtaubepe@redhat.com>
Link: https://patch.msgid.link/20260725001614.2578617-2-tchiu@tenstorrent.com
Cc: stable@vger.kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
x86 did this in commit b0a848f ("x86/bugs: Make i386 use
GENERIC_BUG_RELATIVE_POINTERS")

powerpc did this in commit 1baa1f7 ("powerpc: Allow relative
pointers in bug table entries")

Similar as x86 and powerpc does, make RV32 use
GENERIC_BUG_RELATIVE_POINTERS for "there is only one code path." and
"less #ifdef is more better".

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://patch.msgid.link/20260221024255.3552-1-jszhang@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
riscv always selects RISCV_ALTERNATIVE now, so we can remove this
Kconfig option and enable RISCV_ALTERNATIVE code unconditionally.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
This is the preparation of optimizing pgtable_l4|l5_enabled(). No
functionality change.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…nabled

The pgtable_l4|[l5]_enabled check sits at hot code path, performance
is impacted a lot. Since pgtable_l4|[l5]_enabled isn't changed after
boot, we can use alternative mechanism to optimize them.

So the question is whether we can add RISCV_ISA_EXT_SV48/SV5 and use
riscv_has_extension_*() or not. Although, per [1] and [2], SV48 and
SV57 are ISA exensions too, RISCV_ISA_EXT_SV48/SV57 are to describe hw
supported extensions, while this doesn't mean the pgtable_l4|l5 is
enabled, for example, we may pass no5lvl/no4lvl kernel boot args or
explicitly ask for SV39 by setting dt mmu-type property as
"riscv,sv39". If we clear RISCV_ISA_EXT_SV48|SV57, then internal
extension queries and potentially userspace reporting can no longer
distinguish “unsupported” from “supported but disabled.”

Introduce cap framework to describe the capabilities selected by
kernel. It also uses similar alternatives mechanism as the
riscv_has_extension_*() helpers.

After that, use it to optimize pgtable_l4|l5_enabled.

For the typical access_ok(addr, 1);
before the patch:

...
auipc	a5,0xb43
lbu	a5,100(a5) # ffffffff80b51f68 <pgtable_l5_enabled>
bnez	a5,ffffffff8000ef46 <foo+0x56>
auipc	a5,0xb43
lbu	a5,91(a5) # ffffffff80b51f69 <pgtable_l4_enabled>
beqz	a5,ffffffff8000ef5a <foo+0x6a>
...

after the patch:
there are only two j or nop instructions which avoid memory load and
test branch.

Initial test lmbench's lat_syscall write on TH1520 platforms shows that
the write syscall latency is reduced by about 2.38%.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://github.com/riscv/riscv-isa-manual/blob/main/src/profiles/profiles.adoc [1]
Link: https://riscv.atlassian.net/wiki/spaces/HOME/pages/16154732/Ratified+ISA+Extensions [2]
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 147.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2499.82 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 3136.50 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 28.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 30.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.47 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 90.57 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
module-param
Desc: Detect module_param changes
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] riscv: remove RISCV_ALTERNATIVE Kconfig option"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 52.85 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:33.644257
I: default: FAIL in 0:00:11.343671
I: kernel: SKIP in 0:00:00.000006
I: xipkernel: SKIP in 0:00:00.000003
I: modules: FAIL in 0:00:00.108500
I: dtbs: PASS in 0:00:02.514952
I: dtbs-legacy: SKIP in 0:00:00.005093
I: debugkernel: SKIP in 0:00:00.000005
I: headers: PASS in 0:00:01.069621
I: build output in /build/tmp.mfQI1QBrOz
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=rv32_defconfig --toolchain=llvm --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.mfQI1QBrOz/build/= --runtime=null --image=docker.io/tuxmake/riscv_clang CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.mfQI1QBrOz/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' rv32_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.mfQI1QBrOz/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang'
In file included from /build/tmp1_k_36uv/arch/riscv/kernel/asm-offsets.c:9:
In file included from /build/tmp1_k_36uv/include/linux/mm.h:31:
In file included from /build/tmp1_k_36uv/include/linux/pgtable.h:6:
In file included from /build/tmp1_k_36uv/arch/riscv/include/asm/pgtable.h:142:
/build/tmp1_k_36uv/arch/riscv/include/asm/pgtable-32.h:36:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   36 | static inline bool pgtable_l4_enabled() { return false; }
      |                                      ^
      |                                       void
/build/tmp1_k_36uv/arch/riscv/include/asm/pgtable-32.h:37:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   37 | static inline bool pgtable_l5_enabled() { return false; }
      |                                      ^
      |                                       void
2 errors generated.
make[3]: *** [/build/tmp1_k_36uv/scripts/Makefile.build:185: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmp1_k_36uv/Makefile:1414: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmp1_k_36uv/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
rm -rf /build/tmp.mfQI1QBrOz/build/modinstall
make --silent --keep-going --jobs=48 O=/build/tmp.mfQI1QBrOz/build INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=/build/tmp.mfQI1QBrOz/build/modinstall ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' modules_install
make[3]: *** No rule to make target 'modules.order', needed by '/build/tmp.mfQI1QBrOz/build/modinstall/lib/modules/7.2.0-08300-g2fcd92a5c7cc/modules.order'.
make[3]: *** No rule to make target 'modules.builtin', needed by '/build/tmp.mfQI1QBrOz/build/modinstall/lib/modules/7.2.0-08300-g2fcd92a5c7cc/modules.builtin'.
make[3]: *** No rule to make target 'modules.builtin.modinfo', needed by '/build/tmp.mfQI1QBrOz/build/modinstall/lib/modules/7.2.0-08300-g2fcd92a5c7cc/modules.builtin.modinfo'.
make[3]: Target '__modinst' not remade because of errors.
make[2]: *** [/build/tmp1_k_36uv/Makefile:2099: modules_install] Error 2
make[1]: *** [/build/tmp1_k_36uv/Makefile:248: __sub-make] Error 2
make[1]: Target 'modules_install' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'modules_install' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.mfQI1QBrOz/build INSTALL_DTBS_PATH=/build/tmp.mfQI1QBrOz/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs
rm -rf /build/tmp.mfQI1QBrOz/build/dtbsinstall
mkdir -p /build/tmp.mfQI1QBrOz/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.mfQI1QBrOz/build INSTALL_DTBS_PATH=/build/tmp.mfQI1QBrOz/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1788112819 --clamp-mtime -caf /build/tmp.mfQI1QBrOz/build/dtbs.tar -C /build/tmp.mfQI1QBrOz/build/dtbsinstall dtbs
rm -rf /build/tmp.mfQI1QBrOz/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.mfQI1QBrOz/build INSTALL_HDR_PATH=/build/tmp.mfQI1QBrOz/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1788112819 --clamp-mtime -caf /build/tmp.mfQI1QBrOz/build/headers.tar -C /build/tmp.mfQI1QBrOz/build/install_hdr .
warnings/errors:
/build/tmp1_k_36uv/arch/riscv/include/asm/pgtable-32.h:36:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
/build/tmp1_k_36uv/arch/riscv/include/asm/pgtable-32.h:37:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2461.09 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 3136.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 28.95 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 30.17 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 4.33 seconds
Result: ERROR
Output:

ERROR: Bad function definition - bool pgtable_l4_enabled() should probably be bool pgtable_l4_enabled(void)
#99: FILE: arch/riscv/include/asm/pgtable-32.h:36:
+static inline bool pgtable_l4_enabled() { return false; }

ERROR: Bad function definition - bool pgtable_l5_enabled() should probably be bool pgtable_l5_enabled(void)
#100: FILE: arch/riscv/include/asm/pgtable-32.h:37:
+static inline bool pgtable_l5_enabled() { return false; }

CHECK: Consider using #include <linux/pgtable.h> instead of <asm/pgtable.h>
#296: FILE: arch/riscv/include/asm/vmalloc.h:6:
+#include <asm/pgtable.h>

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
#338: FILE: arch/riscv/mm/init.c:57:
+EXPORT_SYMBOL(_pgtable_l4_enabled);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
#339: FILE: arch/riscv/mm/init.c:58:
+EXPORT_SYMBOL(_pgtable_l5_enabled);

total: 2 errors, 2 warnings, 1 checks, 537 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 2fcd92a5c7cc ("riscv: convert pgtable_l4|l5_enabled to inline function") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
CHECK: Consider using #include <linux/pgtable.h> instead of <asm/pgtable.h>
ERROR: Bad function definition - bool pgtable_l4_enabled() should probably be bool pgtable_l4_enabled(void)
ERROR: Bad function definition - bool pgtable_l5_enabled() should probably be bool pgtable_l5_enabled(void)
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 91.01 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
kdoc
Desc: Detects for kdoc errors
Duration: 0.86 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
module-param
Desc: Detect module_param changes
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] riscv: convert pgtable_l4|l5_enabled to inline function"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 52.07 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:34.098468
I: default: FAIL in 0:00:10.769915
I: kernel: SKIP in 0:00:00.000008
I: xipkernel: SKIP in 0:00:00.000004
I: modules: FAIL in 0:00:00.105061
I: dtbs: PASS in 0:00:02.133776
I: dtbs-legacy: SKIP in 0:00:00.005332
I: debugkernel: SKIP in 0:00:00.000005
I: headers: PASS in 0:00:01.087431
I: build output in /build/tmp.PTs1XSc4Ws
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=rv32_defconfig --toolchain=llvm --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.PTs1XSc4Ws/build/= --runtime=null --image=docker.io/tuxmake/riscv_clang CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.PTs1XSc4Ws/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' rv32_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.PTs1XSc4Ws/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang'
In file included from /build/tmp3oe22ysv/arch/riscv/kernel/asm-offsets.c:9:
In file included from /build/tmp3oe22ysv/include/linux/mm.h:31:
In file included from /build/tmp3oe22ysv/include/linux/pgtable.h:6:
In file included from /build/tmp3oe22ysv/arch/riscv/include/asm/pgtable.h:142:
/build/tmp3oe22ysv/arch/riscv/include/asm/pgtable-32.h:36:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   36 | static inline bool pgtable_l4_enabled() { return false; }
      |                                      ^
      |                                       void
/build/tmp3oe22ysv/arch/riscv/include/asm/pgtable-32.h:37:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   37 | static inline bool pgtable_l5_enabled() { return false; }
      |                                      ^
      |                                       void
2 errors generated.
make[3]: *** [/build/tmp3oe22ysv/scripts/Makefile.build:185: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmp3oe22ysv/Makefile:1414: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmp3oe22ysv/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
rm -rf /build/tmp.PTs1XSc4Ws/build/modinstall
make --silent --keep-going --jobs=48 O=/build/tmp.PTs1XSc4Ws/build INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=/build/tmp.PTs1XSc4Ws/build/modinstall ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' modules_install
make[3]: *** No rule to make target 'modules.order', needed by '/build/tmp.PTs1XSc4Ws/build/modinstall/lib/modules/7.2.0-08301-g608fe8d2b4ce/modules.order'.
make[3]: *** No rule to make target 'modules.builtin', needed by '/build/tmp.PTs1XSc4Ws/build/modinstall/lib/modules/7.2.0-08301-g608fe8d2b4ce/modules.builtin'.
make[3]: *** No rule to make target 'modules.builtin.modinfo', needed by '/build/tmp.PTs1XSc4Ws/build/modinstall/lib/modules/7.2.0-08301-g608fe8d2b4ce/modules.builtin.modinfo'.
make[3]: Target '__modinst' not remade because of errors.
make[2]: *** [/build/tmp3oe22ysv/Makefile:2099: modules_install] Error 2
make[1]: *** [/build/tmp3oe22ysv/Makefile:248: __sub-make] Error 2
make[1]: Target 'modules_install' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'modules_install' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.PTs1XSc4Ws/build INSTALL_DTBS_PATH=/build/tmp.PTs1XSc4Ws/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs
rm -rf /build/tmp.PTs1XSc4Ws/build/dtbsinstall
mkdir -p /build/tmp.PTs1XSc4Ws/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.PTs1XSc4Ws/build INSTALL_DTBS_PATH=/build/tmp.PTs1XSc4Ws/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1788112819 --clamp-mtime -caf /build/tmp.PTs1XSc4Ws/build/dtbs.tar -C /build/tmp.PTs1XSc4Ws/build/dtbsinstall dtbs
rm -rf /build/tmp.PTs1XSc4Ws/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.PTs1XSc4Ws/build INSTALL_HDR_PATH=/build/tmp.PTs1XSc4Ws/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1788112819 --clamp-mtime -caf /build/tmp.PTs1XSc4Ws/build/headers.tar -C /build/tmp.PTs1XSc4Ws/build/install_hdr .
warnings/errors:
/build/tmp3oe22ysv/arch/riscv/include/asm/pgtable-32.h:36:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
/build/tmp3oe22ysv/arch/riscv/include/asm/pgtable-32.h:37:38: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2446.56 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 3173.05 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 28.81 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 30.40 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.76 seconds
Result: WARNING
Output:

CHECK: spaces preferred around that '%' (ctx:WxV)
#108: FILE: arch/riscv/include/asm/cpufeature-macros.h:63:
+	asm goto(ALTERNATIVE("j	%l[l_no]", "nop", 0, %[cap], 1)
 	                       	                     ^

CHECK: Blank lines aren't necessary after an open brace '{'
#121: FILE: arch/riscv/include/asm/cpufeature-macros.h:76:
+{
+

CHECK: spaces preferred around that '%' (ctx:WxV)
#122: FILE: arch/riscv/include/asm/cpufeature-macros.h:77:
+	asm goto(ALTERNATIVE("nop", "j	%l[l_yes]", 0, %[cap], 1)
 	                              	               ^

total: 0 errors, 0 warnings, 3 checks, 272 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 608fe8d2b4ce ("riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 3 checks, 272 lines checked
CHECK: Blank lines aren't necessary after an open brace '{'
CHECK: spaces preferred around that '%' (ctx:WxV)


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 91.37 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 3.63 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
kdoc
Desc: Detects for kdoc errors
Duration: 0.94 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
module-param
Desc: Detect module_param changes
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] riscv: introduce cap framework and use it to optimize pgtable_l4|l5_enabled"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from 1252e7d to cf66746 Compare September 1, 2026 20:29
@linux-riscv-bot
linux-riscv-bot deleted the pw1153959 branch September 1, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants