arm64: frace: use asm EXPORT_SYMBOL()
authorMark Rutland <mark.rutland@arm.com>
Fri, 7 Dec 2018 18:08:22 +0000 (18:08 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 10 Dec 2018 11:50:12 +0000 (11:50 +0000)
For a while now it's been possible to use EXPORT_SYMBOL() in assembly
files, which allows us to place exports immediately after assembly
functions, as we do for C functions.

As a step towards removing arm64ksyms.c, let's move the ftrace exports
to the assembly files the functions are defined in.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/arm64ksyms.c
arch/arm64/kernel/entry-ftrace.S

index c142103bc0fe9027351fcac4d00fcfc70575c238..4ca8d2b245d232e9d8a37c4b0a1fa2d104326068 100644 (file)
@@ -28,8 +28,3 @@
 
 #include <asm/checksum.h>
 
-#ifdef CONFIG_FUNCTION_TRACER
-EXPORT_SYMBOL(_mcount);
-NOKPROBE_SYMBOL(_mcount);
-#endif
-
index 032e24d2d554ce34b712725f54d4dafdf7dacbae..81b8eb5c463323042f60f281ebd6d8f61f057972 100644 (file)
@@ -120,6 +120,8 @@ skip_ftrace_call:                   // }
 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
        mcount_exit
 ENDPROC(_mcount)
+EXPORT_SYMBOL(_mcount)
+NOKPROBE(_mcount)
 
 #else /* CONFIG_DYNAMIC_FTRACE */
 /*
@@ -131,6 +133,8 @@ ENDPROC(_mcount)
 ENTRY(_mcount)
        ret
 ENDPROC(_mcount)
+EXPORT_SYMBOL(_mcount)
+NOKPROBE(_mcount)
 
 /*
  * void ftrace_caller(unsigned long return_address)