diff options
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 11 | ||||
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc_ksyms.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 5 | ||||
-rw-r--r-- | include/asm-powerpc/ftrace.h | 6 |
6 files changed, 20 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 0e6221889ca9..3b1dd29d9f91 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -1129,18 +1129,11 @@ _GLOBAL(_mcount) | |||
1129 | stw r5, 8(r1) | 1129 | stw r5, 8(r1) |
1130 | 1130 | ||
1131 | LOAD_REG_ADDR(r5, ftrace_trace_function) | 1131 | LOAD_REG_ADDR(r5, ftrace_trace_function) |
1132 | #if 0 | ||
1133 | mtctr r3 | ||
1134 | mr r1, r5 | ||
1135 | bctrl | ||
1136 | #endif | ||
1137 | lwz r5,0(r5) | 1132 | lwz r5,0(r5) |
1138 | #if 1 | 1133 | |
1139 | mtctr r5 | 1134 | mtctr r5 |
1140 | bctrl | 1135 | bctrl |
1141 | #else | 1136 | |
1142 | bl ftrace_stub | ||
1143 | #endif | ||
1144 | nop | 1137 | nop |
1145 | 1138 | ||
1146 | lwz r6, 8(r1) | 1139 | lwz r6, 8(r1) |
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 5a4993fefa45..69ed41223468 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
@@ -51,10 +51,16 @@ notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr) | |||
51 | { | 51 | { |
52 | static unsigned int op; | 52 | static unsigned int op; |
53 | 53 | ||
54 | /* | ||
55 | * It would be nice to just use create_function_call, but that will | ||
56 | * update the code itself. Here we need to just return the | ||
57 | * instruction that is going to be modified, without modifying the | ||
58 | * code. | ||
59 | */ | ||
54 | addr = GET_ADDR(addr); | 60 | addr = GET_ADDR(addr); |
55 | 61 | ||
56 | /* Set to "bl addr" */ | 62 | /* Set to "bl addr" */ |
57 | op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffe); | 63 | op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffc); |
58 | 64 | ||
59 | /* | 65 | /* |
60 | * No locking needed, this must be called via kstop_machine | 66 | * No locking needed, this must be called via kstop_machine |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index cf6b5a7d8b3f..4300db52662a 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <asm/div64.h> | 43 | #include <asm/div64.h> |
44 | #include <asm/signal.h> | 44 | #include <asm/signal.h> |
45 | #include <asm/dcr.h> | 45 | #include <asm/dcr.h> |
46 | #include <asm/ftrace.h> | ||
46 | 47 | ||
47 | #ifdef CONFIG_PPC32 | 48 | #ifdef CONFIG_PPC32 |
48 | extern void transfer_to_handler(void); | 49 | extern void transfer_to_handler(void); |
@@ -68,6 +69,10 @@ EXPORT_SYMBOL(single_step_exception); | |||
68 | EXPORT_SYMBOL(sys_sigreturn); | 69 | EXPORT_SYMBOL(sys_sigreturn); |
69 | #endif | 70 | #endif |
70 | 71 | ||
72 | #ifdef CONFIG_FTRACE | ||
73 | EXPORT_SYMBOL(_mcount); | ||
74 | #endif | ||
75 | |||
71 | EXPORT_SYMBOL(strcpy); | 76 | EXPORT_SYMBOL(strcpy); |
72 | EXPORT_SYMBOL(strncpy); | 77 | EXPORT_SYMBOL(strncpy); |
73 | EXPORT_SYMBOL(strcat); | 78 | EXPORT_SYMBOL(strcat); |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 22f8e2bacd32..19e8fcb9cea8 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -47,11 +47,6 @@ | |||
47 | #include <asm/kgdb.h> | 47 | #include <asm/kgdb.h> |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifdef CONFIG_FTRACE | ||
51 | extern void _mcount(void); | ||
52 | EXPORT_SYMBOL(_mcount); | ||
53 | #endif | ||
54 | |||
55 | extern void bootx_init(unsigned long r4, unsigned long phys); | 50 | extern void bootx_init(unsigned long r4, unsigned long phys); |
56 | 51 | ||
57 | int boot_cpuid; | 52 | int boot_cpuid; |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 277bf18cbbcc..098fd96a394a 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -85,11 +85,6 @@ struct ppc64_caches ppc64_caches = { | |||
85 | }; | 85 | }; |
86 | EXPORT_SYMBOL_GPL(ppc64_caches); | 86 | EXPORT_SYMBOL_GPL(ppc64_caches); |
87 | 87 | ||
88 | #ifdef CONFIG_FTRACE | ||
89 | extern void _mcount(void); | ||
90 | EXPORT_SYMBOL(_mcount); | ||
91 | #endif | ||
92 | |||
93 | /* | 88 | /* |
94 | * These are used in binfmt_elf.c to put aux entries on the stack | 89 | * These are used in binfmt_elf.c to put aux entries on the stack |
95 | * for each elf executable being started. | 90 | * for each elf executable being started. |
diff --git a/include/asm-powerpc/ftrace.h b/include/asm-powerpc/ftrace.h new file mode 100644 index 000000000000..b1bfa704b6e5 --- /dev/null +++ b/include/asm-powerpc/ftrace.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _ASM_POWERPC_FTRACE | ||
2 | #define _ASM_POWERPC_FTRACE | ||
3 | |||
4 | extern void _mcount(void); | ||
5 | |||
6 | #endif | ||