All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: include linux/ftrace.h in asm-prototypes.h
@ 2018-09-06 21:57 James Cowgill
  2018-09-10 11:23 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: James Cowgill @ 2018-09-06 21:57 UTC (permalink / raw)
  To: linux-riscv

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.

Reported-by: Karsten Merker <merker@debian.org>
Signed-off-by: James Cowgill <jcowgill@debian.org>
---
 arch/riscv/include/asm/asm-prototypes.h | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 arch/riscv/include/asm/asm-prototypes.h

diff --git a/arch/riscv/include/asm/asm-prototypes.h b/arch/riscv/include/asm/asm-prototypes.h
new file mode 100644
index 000000000000..c9fecd120d18
--- /dev/null
+++ b/arch/riscv/include/asm/asm-prototypes.h
@@ -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 */
-- 
2.19.0.rc2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] RISC-V: include linux/ftrace.h in asm-prototypes.h
  2018-09-06 21:57 [PATCH] RISC-V: include linux/ftrace.h in asm-prototypes.h James Cowgill
@ 2018-09-10 11:23 ` Christoph Hellwig
  2018-09-21  6:44   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2018-09-10 11:23 UTC (permalink / raw)
  To: linux-riscv

On Thu, Sep 06, 2018 at 10:57:56PM +0100, James Cowgill wrote:
> 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.
> 
> Reported-by: Karsten Merker <merker@debian.org>
> Signed-off-by: James Cowgill <jcowgill@debian.org>

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] RISC-V: include linux/ftrace.h in asm-prototypes.h
  2018-09-10 11:23 ` Christoph Hellwig
@ 2018-09-21  6:44   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-09-21  6:44 UTC (permalink / raw)
  To: linux-riscv

On Mon, Sep 10, 2018 at 04:23:06AM -0700, Christoph Hellwig wrote:
> On Thu, Sep 06, 2018 at 10:57:56PM +0100, James Cowgill wrote:
> > 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.
> > 
> > Reported-by: Karsten Merker <merker@debian.org>
> > Signed-off-by: James Cowgill <jcowgill@debian.org>
> 
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-21  6:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-06 21:57 [PATCH] RISC-V: include linux/ftrace.h in asm-prototypes.h James Cowgill
2018-09-10 11:23 ` Christoph Hellwig
2018-09-21  6:44   ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.