aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/entry_32.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/entry_32.S')
-rw-r--r--arch/x86/kernel/entry_32.S27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 2a609dc3271c..f47b9b5440d2 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1109,6 +1109,33 @@ ENDPROC(xen_failsafe_callback)
1109 1109
1110#endif /* CONFIG_XEN */ 1110#endif /* CONFIG_XEN */
1111 1111
1112#ifdef CONFIG_FTRACE
1113ENTRY(mcount)
1114 cmpl $ftrace_stub, ftrace_trace_function
1115 jnz trace
1116
1117.globl ftrace_stub
1118ftrace_stub:
1119 ret
1120
1121 /* taken from glibc */
1122trace:
1123 pushl %eax
1124 pushl %ecx
1125 pushl %edx
1126 movl 0xc(%esp), %eax
1127 movl 0x4(%ebp), %edx
1128
1129 call *ftrace_trace_function
1130
1131 popl %edx
1132 popl %ecx
1133 popl %eax
1134
1135 jmp ftrace_stub
1136END(mcount)
1137#endif
1138
1112.section .rodata,"a" 1139.section .rodata,"a"
1113#include "syscall_table_32.S" 1140#include "syscall_table_32.S"
1114 1141