RISC-V: include linux/ftrace.h in asm-prototypes.h
PATCH 1/1 RISC-V: include linux/ftrace.h in asm-prototypes.h
Building a riscv kernel with CONFIG_FUNCTION_TRACER and CONFIG_MODVERSIONS enabled results in these two warnings:
MODPOST vmlinux.o
WARNING: EXPORT symbol "return_to_handler" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned.
When exporting symbols from an assembly file, the MODVERSIONS code requires their prototypes to be defined in asm-prototypes.h (see scripts/Makefile.build). Since both of these symbols have prototypes defined in linux/ftrace.h, include this header from RISC-V's asm-prototypes.h.
--- arch/riscv/include/asm/asm-prototypes.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 arch/riscv/include/asm/asm-prototypes.h
arch/riscv/include/asm/asm-prototypes.h new file +7 -0
@@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_RISCV_PROTOTYPES_H + +#include <linux/ftrace.h> +#include <asm-generic/asm-prototypes.h> + +#endif /* _ASM_RISCV_PROTOTYPES_H */
Signature · 1 line
2.19.0.rc2
PATCH 1/1 RISC-V: include linux/ftrace.h in asm-prototypes.h
Quoted 8 lines · James Cowgill
When exporting symbols from an assembly file, the MODVERSIONS code requires their prototypes to be defined in
asm-prototypes.h(seescripts/Makefile.build). Since both of these symbols have prototypes defined inlinux/ftrace.h, include this header from RISC-V'sasm-prototypes.h.Reported-by Karsten Merker <[email protected]>Signed-off-by James Cowgill <[email protected]>
I think this needs at very least a good comment, including for which symbols you are doing this.
Also I'm curious if it might be worth just handling this in the asm-generic version, as those symbols should be assembly exports in most architectures.
PATCH 1/1 RISC-V: include linux/ftrace.h in asm-prototypes.h
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · James Cowgill
When exporting symbols from an assembly file, the MODVERSIONS code requires their prototypes to be defined in
asm-prototypes.h(seescripts/Makefile.build). Since both of these symbols have prototypes defined inlinux/ftrace.h, include this header from RISC-V'sasm-prototypes.h.Reported-by Karsten Merker <[email protected]>Signed-off-by James Cowgill <[email protected]>
Quoted 6 lines
I think this needs at very least a good comment, including for which symbols you are doing this.
Also I'm curious if it might be worth just handling this in the asm-generic version, as those symbols should be assembly exports in most architectures.
Ok, looks like we don't really need the asm-generic asm-prototypes.h to start with as far as I can tell. So I think you can resubmit it with just the ftrace.h include and a comment.