Skip to content

Commit 827456e

Browse files
paulburtonralfbaechle
authored andcommitted
MIPS: Export _mcount alongside its definition
Now that EXPORT_SYMBOL can be used from assembly source, move the EXPORT_SYMBOL invocation for _mcount to be alongside its definition. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14525/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 29830c1 commit 827456e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

arch/mips/kernel/mcount.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* Author: Wu Zhangjin <wuzhangjin@gmail.com>
1111
*/
1212

13+
#include <asm/export.h>
1314
#include <asm/regdef.h>
1415
#include <asm/stackframe.h>
1516
#include <asm/ftrace.h>
@@ -66,6 +67,7 @@
6667
NESTED(ftrace_caller, PT_SIZE, ra)
6768
.globl _mcount
6869
_mcount:
70+
EXPORT_SYMBOL(_mcount)
6971
b ftrace_stub
7072
#ifdef CONFIG_32BIT
7173
addiu sp,sp,8
@@ -114,6 +116,7 @@ ftrace_stub:
114116
#else /* ! CONFIG_DYNAMIC_FTRACE */
115117

116118
NESTED(_mcount, PT_SIZE, ra)
119+
EXPORT_SYMBOL(_mcount)
117120
PTR_LA t1, ftrace_stub
118121
PTR_L t2, ftrace_trace_function /* Prepare t2 for (1) */
119122
bne t1, t2, static_trace

arch/mips/kernel/mips_ksyms.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,3 @@ EXPORT_SYMBOL(__csum_partial_copy_from_user);
8080
#endif
8181

8282
EXPORT_SYMBOL(invalid_pte_table);
83-
#ifdef CONFIG_FUNCTION_TRACER
84-
/* _mcount is defined in arch/mips/kernel/mcount.S */
85-
EXPORT_SYMBOL(_mcount);
86-
#endif

0 commit comments

Comments
 (0)