Skip to content

[PW_SID:1122384] riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE#2227

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1122384
Closed

[PW_SID:1122384] riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE#2227
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1122384

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1122384 applied to workflow__riscv__fixes

Name: riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1122384
Version: 1

Linux RISC-V bot and others added 2 commits July 1, 2026 03:48
The FUNCTION_ALIGNMENT_4B select forces the whole kernel to be built
with -fmin-function-alignment=4. This alignment is only needed so the
patchable-function-entry NOPs, which arch/riscv/Makefile emits under
CONFIG_DYNAMIC_FTRACE, can be patched reliably on RISCV_ISA_C=y builds
where compressed instructions otherwise allow 2-byte function
alignment.

The select is currently gated on HAVE_DYNAMIC_FTRACE, a capability bit
that is selected whenever the toolchain supports dynamic ftrace, rather
than on whether tracing is actually enabled. As a result every
RISCV_ISA_C=y build gets 4-byte function alignment across the entire
kernel even when function tracing is disabled, needlessly growing the
kernel image and wasting instruction cache for a feature that is not
in use.

Gate the select on DYNAMIC_FTRACE instead, matching the condition under
which arch/riscv/Makefile emits -fpatchable-function-entry, so the
alignment is only applied when it is actually needed.

Fixes: c41bf43 ("riscv: ftrace: align patchable functions to 4 Byte boundary")
Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 120.65 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1118.15 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1447.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 22.15 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 23.68 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.58 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 78.68 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
kdoc
Desc: Detects for kdoc errors
Duration: 0.73 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
module-param
Desc: Detect module_param changes
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 6 times, most recently from da477a6 to 869345e Compare July 13, 2026 18:24
@linux-riscv-bot
linux-riscv-bot deleted the pw1122384 branch July 13, 2026 18:25
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.

2 participants