summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/head.S
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2016-04-13 22:27:22 +0200
committerHelge Deller <deller@gmx.de>2016-04-14 17:47:19 +0200
commit366dd4ea9d5f0eb78fdf4982d76506f99480ec0a (patch)
treea1540803a33b13685a1fe2e3fa8af13bc2e7f018 /arch/parisc/kernel/head.S
parentLinux 4.5 (diff)
downloadlinux-366dd4ea9d5f0eb78fdf4982d76506f99480ec0a.tar.xz
linux-366dd4ea9d5f0eb78fdf4982d76506f99480ec0a.zip
parisc: Fix ftrace function tracer
Fix the FTRACE function tracer for 32- and 64-bit kernel. The former code was horribly broken. Reimplement most coding in assembly and utilize optimizations, e.g. put mcount() and ftrace_stub() into one L1 cacheline. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to '')
-rw-r--r--arch/parisc/kernel/head.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S
index 75aa0db9f69e..bbbe360b458f 100644
--- a/arch/parisc/kernel/head.S
+++ b/arch/parisc/kernel/head.S
@@ -129,6 +129,15 @@ $pgt_fill_loop:
/* And the stack pointer too */
ldo THREAD_SZ_ALGN(%r6),%sp
+#if defined(CONFIG_64BIT) && defined(CONFIG_FUNCTION_TRACER)
+ .import _mcount,data
+ /* initialize mcount FPTR */
+ /* Get the global data pointer */
+ loadgp
+ load32 PA(_mcount), %r10
+ std %dp,0x18(%r10)
+#endif
+
#ifdef CONFIG_SMP
/* Set the smp rendezvous address into page zero.
** It would be safer to do this in init_smp_config() but