I've tried this patch - build is fixed and function tracing appears to work.
Thank you, Ruben
-----Original Message----- From: Kevin Brodsky kevin.brodsky@arm.com Sent: 26 September 2022 11:59 To: linux-morello@op-lists.linaro.org Cc: Kevin Brodsky Kevin.Brodsky@arm.com; Ruben Ayrapetyan Ruben.Ayrapetyan@arm.com Subject: [PATCH] arm64: entry-ftrace.S: Fix build when CONFIG_ARM64_MORELLO=y
When Morello support is enabled, the size of struct pt_regs increases drastically (to make space for capability registers). As a result, PT_REGS_SIZE can unfortunately no longer be used as an immediate for LDP/STP. Use an explicit ADD instead.
This fixes the build when CONFIG_ARM64_MORELLO and CONFIG_FUNCTION_TRACER are both selected.
Reported-by: Ruben Ayrapetyan ruben.ayrapetyan@arm.com Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- arch/arm64/kernel/entry-ftrace.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/entry-ftrace.S b/arch/arm64/kernel/entry-ftrace.S index e535480a4069..66f75e2b2637 100644 --- a/arch/arm64/kernel/entry-ftrace.S +++ b/arch/arm64/kernel/entry-ftrace.S @@ -68,8 +68,9 @@ str x30, [sp, #S_PC]
/* Create a frame record for the callsite above pt_regs */ - stp x29, x9, [sp, #PT_REGS_SIZE] - add x29, sp, #PT_REGS_SIZE + add x10, sp, #PT_REGS_SIZE + stp x29, x9, [x10] + mov x29, x10
/* Create our frame record within pt_regs. */ stp x29, x30, [sp, #S_STACKFRAME] -- 2.34.1
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.