[PW_SID:1122384] riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE#2227
[PW_SID:1122384] riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE#2227linux-riscv-bot wants to merge 2 commits into
Conversation
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>
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
|
Patch 1: "riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE" |
da477a6 to
869345e
Compare
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