linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guan Xuetao <gxt@mprc.pku.edu.cn>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
Date: Mon, 04 Jul 2011 09:56:39 +0800	[thread overview]
Message-ID: <1309744599.2291.1.camel@epip-laptop> (raw)
In-Reply-To: <20110702033854.432833160@goodmis.org>

It looks good to me.

Thanks & Regards.

Guan Xuetao

On Fri, 2011-07-01 at 23:04 -0400, Steven Rostedt wrote:
> plain text document attachment
> (0010-sh-unicore32-irqs-Do-not-trace-arch_local_-irq_-func.patch)
> From: Steven Rostedt <srostedt@redhat.com>
> 
> Do not trace arch_local_save_flags(), arch_local_irq_*() and friends.
> Although they are marked inline, gcc may still make a function out of
> them and add it to the pool of functions that are traced by the function
> tracer. This can cause undesirable results (kernel panic, triple faults,
> etc).
> 
> Add the notrace notation to prevent them from ever being traced.
> 
> This patch only updates include/asm-generic/irqflags.h, but the only archs
> to use it is superH and unicore32.
> 
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
>  include/asm-generic/irqflags.h |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/include/asm-generic/irqflags.h b/include/asm-generic/irqflags.h
> index 1f40d002..092b27e 100644
> --- a/include/asm-generic/irqflags.h
> +++ b/include/asm-generic/irqflags.h
> @@ -1,6 +1,8 @@
>  #ifndef __ASM_GENERIC_IRQFLAGS_H
>  #define __ASM_GENERIC_IRQFLAGS_H
>  
> +#include <linux/types.h>
> +
>  /*
>   * All architectures should implement at least the first two functions,
>   * usually inline assembly will be the best way.
> @@ -22,7 +24,7 @@ void arch_local_irq_restore(unsigned long flags);
>  
>  /* get status and disable interrupts */
>  #ifndef arch_local_irq_save
> -static inline unsigned long arch_local_irq_save(void)
> +static inline notrace unsigned long arch_local_irq_save(void)
>  {
>  	unsigned long flags;
>  	flags = arch_local_save_flags();
> @@ -33,7 +35,7 @@ static inline unsigned long arch_local_irq_save(void)
>  
>  /* test flags */
>  #ifndef arch_irqs_disabled_flags
> -static inline int arch_irqs_disabled_flags(unsigned long flags)
> +static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
>  {
>  	return flags == ARCH_IRQ_DISABLED;
>  }
> @@ -41,7 +43,7 @@ static inline int arch_irqs_disabled_flags(unsigned long flags)
>  
>  /* unconditionally enable interrupts */
>  #ifndef arch_local_irq_enable
> -static inline void arch_local_irq_enable(void)
> +static inline notrace void arch_local_irq_enable(void)
>  {
>  	arch_local_irq_restore(ARCH_IRQ_ENABLED);
>  }
> @@ -49,7 +51,7 @@ static inline void arch_local_irq_enable(void)
>  
>  /* unconditionally disable interrupts */
>  #ifndef arch_local_irq_disable
> -static inline void arch_local_irq_disable(void)
> +static inline notrace void arch_local_irq_disable(void)
>  {
>  	arch_local_irq_restore(ARCH_IRQ_DISABLED);
>  }
> @@ -57,7 +59,7 @@ static inline void arch_local_irq_disable(void)
>  
>  /* test hardware interrupt enable bit */
>  #ifndef arch_irqs_disabled
> -static inline int arch_irqs_disabled(void)
> +static inline notrace int arch_irqs_disabled(void)
>  {
>  	return arch_irqs_disabled_flags(arch_local_save_flags());
>  }



  reply	other threads:[~2011-07-04  1:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110702030435.308336775@goodmis.org>
2011-07-02  3:04 ` [patch 01/11] x86/irqs: Do not trace arch_local_{*,irq_*} functions Steven Rostedt
2011-07-07  0:51   ` Steven Rostedt
2011-07-07 21:43   ` [tip:perf/core] tracing, x86/irq: Do not trace arch_local_{*,irq_*}() functions tip-bot for Steven Rostedt
2011-07-02  3:04 ` [patch 02/11] arm/irqs: Do not trace arch_local_{*,irq_*} functions Steven Rostedt
2011-07-02  3:04 ` [patch 03/11] blackfin/irqs: " Steven Rostedt
2011-07-02  6:50   ` Mike Frysinger
2011-07-02 16:11     ` Steven Rostedt
2011-07-02 16:39       ` Mike Frysinger
2011-07-02 16:40   ` Mike Frysinger
2011-07-05 12:51     ` Steven Rostedt
2011-07-05 16:20       ` Mike Frysinger
2011-07-05 19:07   ` Mike Frysinger
2011-07-05 19:13     ` Steven Rostedt
2011-07-05 19:25       ` Mike Frysinger
2011-07-02  3:04 ` [patch 04/11] ia64/irqs: " Steven Rostedt
2011-07-02  3:04 ` [patch 05/11] microblaze/irqs: " Steven Rostedt
2011-07-05 10:43   ` Michal Simek
2011-07-05 12:49     ` Steven Rostedt
2011-07-02  3:04 ` [patch 06/11] mips/irqs: " Steven Rostedt
2011-07-02  3:04 ` [patch 07/11] parisc/irqs: " Steven Rostedt
2011-07-02  3:04 ` [patch 08/11] powerpc/irqs: " Steven Rostedt
2011-07-02  3:04 ` [patch 09/11] s390/irqs: " Steven Rostedt
2011-07-04  8:10   ` Martin Schwidefsky
2011-07-05 12:49     ` Steven Rostedt
2011-07-02  3:04 ` [patch 10/11] sh/unicore32/irqs: " Steven Rostedt
2011-07-04  1:56   ` Guan Xuetao [this message]
2011-07-05 12:50     ` Steven Rostedt
2011-07-11  3:34       ` Paul Mundt
2011-07-13  1:36         ` Steven Rostedt
2011-07-02  3:04 ` [patch 11/11] sparc/irqs: " Steven Rostedt
2011-07-02  4:11   ` David Miller
2011-07-05 12:49     ` Steven Rostedt
2011-07-06  6:43       ` David Miller

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=1309744599.2291.1.camel@epip-laptop \
    --to=gxt@mprc.pku.edu.cn \
    --cc=akpm@linux-foundation.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).