]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc: ftrace_caller, _mcount is exported to modules so needs _GLOBAL_TOC()
authorAnton Blanchard <anton@samba.org>
Thu, 3 Apr 2014 22:06:33 +0000 (09:06 +1100)
committerAnton Blanchard <anton@samba.org>
Wed, 23 Apr 2014 00:05:33 +0000 (10:05 +1000)
When testing the ftrace function tracer, I realised that ftrace_caller
and mcount are called from modules and they both call into C, therefore
they need the ABIv2 global entry point to establish r2.

Signed-off-by: Anton Blanchard <anton@samba.org>
arch/powerpc/kernel/entry_64.S

index cf4f6e693437304cccfd88d2ecd473529b343ca6..9fde8a1bf1e14d617cce4a8093ff210536e271f2 100644 (file)
@@ -1175,7 +1175,7 @@ _GLOBAL(mcount)
 _GLOBAL(_mcount)
        blr
 
-_GLOBAL(ftrace_caller)
+_GLOBAL_TOC(ftrace_caller)
        /* Taken from output of objdump from lib64/glibc */
        mflr    r3
        ld      r11, 0(r1)
@@ -1199,10 +1199,7 @@ _GLOBAL(ftrace_graph_stub)
 _GLOBAL(ftrace_stub)
        blr
 #else
-_GLOBAL(mcount)
-       blr
-
-_GLOBAL(_mcount)
+_GLOBAL_TOC(_mcount)
        /* Taken from output of objdump from lib64/glibc */
        mflr    r3
        ld      r11, 0(r1)