]> err.no Git - linux-2.6/commitdiff
fix "ftrace: store mcount address in rec->ip"
authorIngo Molnar <mingo@elte.hu>
Tue, 1 Jul 2008 15:35:06 +0000 (17:35 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 1 Jul 2008 15:46:14 +0000 (17:46 +0200)
Alexander Beregalov reported this build failure:

$ make CROSS_COMPILE=sparc64-unknown-linux-gnu- image modules && sudo
make modules_install
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
dnsdomainname: Unknown host
  CC      arch/sparc64/kernel/sparc64_ksyms.o
arch/sparc64/kernel/sparc64_ksyms.c:116: error: '_mcount' undeclared
here (not in a function)
cc1: warnings being treated as errors
arch/sparc64/kernel/sparc64_ksyms.c:116: error: type defaults to 'int'
in declaration of '_mcount'

And bisected it back to:

| commit 395a59d0f8e86bb39cd700c3d185d30c670bb958
| Author: Abhishek Sagar <sagar.abhishek@gmail.com>
| Date:   Sat Jun 21 23:47:27 2008 +0530
|
|     ftrace: store mcount address in rec->ip

the mcount prototype is only available under CONFIG_FTRACE,
extend it to CONFIG_MCOUNT as well.

Reported-and-bisected-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/sparc64/kernel/sparc64_ksyms.c
include/asm-sparc64/ftrace.h

index b80d982a29c60b772b6282fc48c6e397946d71fe..49d3ea50c24797f22532aa4a7b6f42605ee74ce3 100644 (file)
@@ -112,7 +112,7 @@ EXPORT_SYMBOL(__write_trylock);
 EXPORT_SYMBOL(smp_call_function);
 #endif /* CONFIG_SMP */
 
-#if defined(CONFIG_MCOUNT)
+#ifdef CONFIG_MCOUNT
 EXPORT_SYMBOL(_mcount);
 #endif
 
index f76a40a338bb7a6fdb1f3eebc966f1b9a4c6eb99..d27716cd38c1ac0243a74104f3106850d24397b1 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _ASM_SPARC64_FTRACE
 #define _ASM_SPARC64_FTRACE
 
-#ifdef CONFIG_FTRACE
+#ifdef CONFIG_MCOUNT
 #define MCOUNT_ADDR            ((long)(_mcount))
 #define MCOUNT_INSN_SIZE       4 /* sizeof mcount call */