Skip to content

Commit 6d9e60c

Browse files
committed
microblaze: ftrace: enable HAVE_FUNCTION_TRACE_MCOUNT_TEST
Implement MCOUNT_TEST in asm code - it is faster than use generic code Signed-off-by: Michal Simek <monstr@monstr.eu>
1 parent 2fd7c76 commit 6d9e60c

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎arch/microblaze/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config MICROBLAZE
77
def_bool y
88
select HAVE_LMB
99
select HAVE_FUNCTION_TRACER
10+
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
1011
select USB_ARCH_HAS_EHCI
1112
select ARCH_WANT_OPTIONAL_GPIOLIB
1213

‎arch/microblaze/kernel/mcount.S‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ ENTRY(ftrace_stub)
8585
ENTRY(_mcount)
8686
SAVE_REGS
8787
swi r15, r1, 0;
88+
/* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST begin of checking */
89+
lwi r5, r0, function_trace_stop;
90+
bneid r5, end;
91+
nop;
92+
/* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST end of checking */
8893
/* MS: test function trace if is taken or not */
8994
lwi r20, r0, ftrace_trace_function;
9095
addik r6, r0, ftrace_stub;

0 commit comments

Comments
 (0)