Skip to content

Commit

Permalink
MIPS: Export _mcount alongside its definition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
paulburton authored and ralfbaechle committed Jan 3, 2017
1 parent 29830c1 commit 827456e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions arch/mips/kernel/mcount.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Author: Wu Zhangjin <wuzhangjin@gmail.com>
*/

#include <asm/export.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>
#include <asm/ftrace.h>
Expand Down Expand Up @@ -66,6 +67,7 @@
NESTED(ftrace_caller, PT_SIZE, ra)
.globl _mcount
_mcount:
EXPORT_SYMBOL(_mcount)
b ftrace_stub
#ifdef CONFIG_32BIT
addiu sp,sp,8
Expand Down Expand Up @@ -114,6 +116,7 @@ ftrace_stub:
#else /* ! CONFIG_DYNAMIC_FTRACE */

NESTED(_mcount, PT_SIZE, ra)
EXPORT_SYMBOL(_mcount)
PTR_LA t1, ftrace_stub
PTR_L t2, ftrace_trace_function /* Prepare t2 for (1) */
bne t1, t2, static_trace
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/kernel/mips_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,3 @@ EXPORT_SYMBOL(__csum_partial_copy_from_user);
#endif

EXPORT_SYMBOL(invalid_pte_table);
#ifdef CONFIG_FUNCTION_TRACER
/* _mcount is defined in arch/mips/kernel/mcount.S */
EXPORT_SYMBOL(_mcount);
#endif

0 comments on commit 827456e

Please sign in to comment.