aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index f05a35a59694..6805a7216bf8 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -128,6 +128,13 @@ ENDPROC(ret_from_fork)
128 * allows it to be clobbered in subroutines and doesn't use it to hold 128 * allows it to be clobbered in subroutines and doesn't use it to hold
129 * parameters.) 129 * parameters.)
130 */ 130 */
131
132#ifndef CONFIG_OLD_MCOUNT
133#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
134#error Ftrace requires CONFIG_FRAME_POINTER=y with GCC older than 4.4.0.
135#endif
136#endif
137
131#ifdef CONFIG_DYNAMIC_FTRACE 138#ifdef CONFIG_DYNAMIC_FTRACE
132ENTRY(mcount) 139ENTRY(mcount)
133 stmdb sp!, {r0-r3, lr} 140 stmdb sp!, {r0-r3, lr}
@@ -173,6 +180,12 @@ gnu_trace:
173 ldmia sp!, {r0-r3, ip, lr} 180 ldmia sp!, {r0-r3, ip, lr}
174 mov pc, ip 181 mov pc, ip
175 182
183#ifdef CONFIG_OLD_MCOUNT
184/*
185 * This is under an ifdef in order to force link-time errors for people trying
186 * to build with !FRAME_POINTER with a GCC which doesn't use the new-style
187 * mcount.
188 */
176ENTRY(mcount) 189ENTRY(mcount)
177 stmdb sp!, {r0-r3, lr} 190 stmdb sp!, {r0-r3, lr}
178 ldr r0, =ftrace_trace_function 191 ldr r0, =ftrace_trace_function
@@ -191,6 +204,7 @@ trace:
191 mov pc, r2 204 mov pc, r2
192 ldr lr, [fp, #-4] @ restore lr 205 ldr lr, [fp, #-4] @ restore lr
193 ldmia sp!, {r0-r3, pc} 206 ldmia sp!, {r0-r3, pc}
207#endif
194 208
195#endif /* CONFIG_DYNAMIC_FTRACE */ 209#endif /* CONFIG_DYNAMIC_FTRACE */
196 210