[PATCH] ftrace: Fix compile error if DYNAMIC_FTRACE is enabled

DORMANTno replies

From: xiaojiang <hidden>
Date: 2010-08-20 06:51:02
Subsystem: arm port, function hooks (ftrace), the rest · Maintainers: Russell King, Steven Rostedt, Masami Hiramatsu, Linus Torvalds

__gnu_mcount_nc() is implemented when kernel doesn't
enable CONFIG_DYNAMIC_FTRACE, so added the condition
where the function are declared.

Signed-off-by: xiaojiang <redacted>
---
 arch/arm/include/asm/ftrace.h |    2 ++
 arch/arm/kernel/armksyms.c    |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 103f7ee..a1c58ab 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -7,8 +7,10 @@

 #ifndef __ASSEMBLY__
 extern void mcount(void);
+#ifndef CONFIG_DYNAMIC_FTRACE
 extern void __gnu_mcount_nc(void);
 #endif
+#endif

 #endif
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 8214bfe..62d00b0 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -166,5 +166,7 @@ EXPORT_SYMBOL(_find_next_bit_be);

 #ifdef CONFIG_FUNCTION_TRACER
 EXPORT_SYMBOL(mcount);
+#ifndef CONFIG_DYNAMIC_FTRACE
 EXPORT_SYMBOL(__gnu_mcount_nc);
 #endif
+#endif
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100820/61bf5cf5/attachment-0001.html>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help