public inbox for linux-parisc@vger.kernel.org
 help / color / mirror / Atom feed
* Ftrace broken on parisc
@ 2014-01-29 19:59 Guy Martin
  2014-01-29 20:44 ` Helge Deller
  0 siblings, 1 reply; 4+ messages in thread
From: Guy Martin @ 2014-01-29 19:59 UTC (permalink / raw)
  To: linux-parisc

Hi all,


It seems that the ftrace subsystem has not been maintained for a few
years.

So far I have the diff at the bottom that attempts to fix it bug there
is still an issue while linking :


arch/parisc/kernel/built-in.o: In function `return_to_handler':
(.text+0xb2a8): undefined reference to `ftrace_return_to_handler'
hppa64-linux-ld: arch/parisc/kernel/built-in.o(.text+0xllx): cannot
reach (null)
arch/parisc/kernel/built-in.o: In function `return_to_handler':
(.text+0xb2a8): relocation truncated to fit: R_PARISC_PCREL17F against
undefined symbol `ftrace_return_to_handler'
make: *** [vmlinux] Error 1

I'm not sure how this can be fixed, the problems comes from the
assembly in entry.S, it uses a 'b' to jump to ftrace_return_to_handler.
I guess 'be' needs to be used but not sure how that'd works with the
linker.

Moreover, there is probably more than this to be fixed.

For the background story, I'm trying to fix this to audit irq handlers
for my pata_sil680 issue.

Adding some printk for irq == 71 in handle_percpu_irq(), I see and odd
behavior. The printk at the end of the function is displayed a lot more
than the printk at the begining of the function. I know printk isn't
the best for irq handlers that's why I was investigating the ftrace way.

Any tip/help is very much welcome !

  Guy

---
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug
index bc989e5..6d23a1a 100644
--- a/arch/parisc/Kconfig.debug
+++ b/arch/parisc/Kconfig.debug
@@ -1,5 +1,8 @@
 menu "Kernel hacking"

+config TRACE_IRQFLAGS_SUPPORT
+       def_bool y
+
 source "lib/Kconfig.debug"

 config DEBUG_RODATA
diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c
index 5beb97b..8c9f757 100644
--- a/arch/parisc/kernel/ftrace.c
+++ b/arch/parisc/kernel/ftrace.c
@@ -156,7 +156,7 @@ void ftrace_function_trampoline(unsigned long
 parent, return;

        if (ftrace_trace_function != ftrace_stub) {
-               ftrace_trace_function(parent, self_addr);
+               ftrace_trace_function(parent, self_addr, NULL, NULL);
                return;
        }
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-12 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 19:59 Ftrace broken on parisc Guy Martin
2014-01-29 20:44 ` Helge Deller
2014-01-29 21:09   ` John David Anglin
2014-02-12 21:51     ` Guy Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox