All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Guy Martin <gmsoft@tuxicoman.be>, linux-parisc@vger.kernel.org
Subject: Re: Ftrace broken on parisc
Date: Wed, 29 Jan 2014 21:44:01 +0100	[thread overview]
Message-ID: <52E96811.7000403@gmx.de> (raw)
In-Reply-To: <20140129205944.4f71ca1c@dellete>

Hi Guy,

On 01/29/2014 08:59 PM, Guy Martin wrote:
> It seems that the ftrace subsystem has not been maintained for a few
> years.

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

I'm not sure I tested 64bit at that time.

> 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.

Can you try
BL ftrace_return_to_handler, %r0
(I'm not good in hppa assembly - as you can see if you take a look at this assembly code section :-)).

> 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 !

Helge


> 
>   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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2014-01-29 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 19:59 Ftrace broken on parisc Guy Martin
2014-01-29 20:44 ` Helge Deller [this message]
2014-01-29 21:09   ` John David Anglin
2014-02-12 21:51     ` Guy Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E96811.7000403@gmx.de \
    --to=deller@gmx.de \
    --cc=gmsoft@tuxicoman.be \
    --cc=linux-parisc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.