All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 01/11] x86/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
@ 2011-07-02  3:04 ` 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
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Ingo Molnar, Thomas Gleixner, H. Peter Anvin

[-- Attachment #1: 0001-x86-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 3159 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

I triggered a triple fault with gcc 4.5.1 because it did not honor
the inline annotation to arch_local_save_flags() function and that
function was added to the pool of functions traced by the function tracer.

When preempt_schedule() called arch_local_save_flags() (called by
irqs_disabled()), it was traced, but the first thing the function tracer
does is disable preemption. When it enables preemption, the NEED_RESCHED
flag will not have been cleared and the preemption check will trigger
the call to preempt_schedule() again.

Although the dynamic function tracer crashed immediately, the static
version of the function tracer (CONFIG_DYNAMIC_FTRACE is not set) actually
was able to show where the problem was.

 swapper-1       3.N.. 103885us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103886us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103886us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103887us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103887us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103888us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103888us : arch_local_save_flags <-preempt_schedule

It went on for a while before it triple faulted with a corrupted stack.

The arch_local_save_flags and arch_local_irq_* functions should not be
traced. Even though they are marked as inline, gcc may still make
them a function and enable tracing of them.

The simple solution is to just mark them as notrace. I had to add the
<linux/types.h> for this file to include the notrace tag.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/x86/include/asm/irqflags.h |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index 5745ce8..bba3cf8 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -60,23 +60,24 @@ static inline void native_halt(void)
 #include <asm/paravirt.h>
 #else
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	return native_save_fl();
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	native_restore_fl(flags);
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	native_irq_disable();
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	native_irq_enable();
 }
@@ -102,7 +103,7 @@ static inline void halt(void)
 /*
  * For spinlocks, etc:
  */
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags = arch_local_save_flags();
 	arch_local_irq_disable();
-- 
1.7.5.4




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

* [patch 02/11] arm/irqs: Do not trace arch_local_{*,irq_*} functions
       [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-02  3:04 ` Steven Rostedt
  2011-07-02  3:04 ` [patch 03/11] blackfin/irqs: " Steven Rostedt
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Russell King

[-- Attachment #1: 0002-arm-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 3174 bytes --]

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.

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/arm/include/asm/irqflags.h |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/include/asm/irqflags.h b/arch/arm/include/asm/irqflags.h
index 1e6cca5..b633507 100644
--- a/arch/arm/include/asm/irqflags.h
+++ b/arch/arm/include/asm/irqflags.h
@@ -10,7 +10,7 @@
  */
 #if __LINUX_ARM_ARCH__ >= 6
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags;
 
@@ -21,7 +21,7 @@ static inline unsigned long arch_local_irq_save(void)
 	return flags;
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	asm volatile(
 		"	cpsie i			@ arch_local_irq_enable"
@@ -30,7 +30,7 @@ static inline void arch_local_irq_enable(void)
 		: "memory", "cc");
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	asm volatile(
 		"	cpsid i			@ arch_local_irq_disable"
@@ -46,7 +46,7 @@ static inline void arch_local_irq_disable(void)
 /*
  * Save the current interrupt enable state & disable IRQs
  */
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags, temp;
 
@@ -63,7 +63,7 @@ static inline unsigned long arch_local_irq_save(void)
 /*
  * Enable IRQs
  */
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	unsigned long temp;
 	asm volatile(
@@ -78,7 +78,7 @@ static inline void arch_local_irq_enable(void)
 /*
  * Disable IRQs
  */
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	unsigned long temp;
 	asm volatile(
@@ -125,7 +125,7 @@ static inline void arch_local_irq_disable(void)
 /*
  * Save the current interrupt enable state.
  */
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	unsigned long flags;
 	asm volatile(
@@ -137,7 +137,7 @@ static inline unsigned long arch_local_save_flags(void)
 /*
  * restore saved IRQ & FIQ state
  */
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	asm volatile(
 		"	msr	cpsr_c, %0	@ local_irq_restore"
@@ -146,7 +146,7 @@ static inline void arch_local_irq_restore(unsigned long flags)
 		: "memory", "cc");
 }
 
-static inline int arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
 {
 	return flags & PSR_I_BIT;
 }
-- 
1.7.5.4




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

* [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
       [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-02  3:04 ` [patch 02/11] arm/irqs: Do not trace arch_local_{*,irq_*} functions Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-02  6:50   ` Mike Frysinger
                     ` (2 more replies)
  2011-07-02  3:04 ` [patch 04/11] ia64/irqs: " Steven Rostedt
                   ` (7 subsequent siblings)
  10 siblings, 3 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Mike Frysinger

[-- Attachment #1: 0003-blackfin-irqs-Do-not-trace-arch_local_-irq_-function.patch --]
[-- Type: text/plain, Size: 5756 bytes --]

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.

Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/blackfin/include/asm/irqflags.h |   42 +++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/arch/blackfin/include/asm/irqflags.h b/arch/blackfin/include/asm/irqflags.h
index b4bbb75..43eb474 100644
--- a/arch/blackfin/include/asm/irqflags.h
+++ b/arch/blackfin/include/asm/irqflags.h
@@ -18,12 +18,12 @@
 extern unsigned long bfin_irq_flags;
 #endif
 
-static inline void bfin_sti(unsigned long flags)
+static inline notrace void bfin_sti(unsigned long flags)
 {
 	asm volatile("sti %0;" : : "d" (flags));
 }
 
-static inline unsigned long bfin_cli(void)
+static inline notrace unsigned long bfin_cli(void)
 {
 	unsigned long flags;
 	asm volatile("cli %0;" : "=d" (flags));
@@ -40,22 +40,22 @@ static inline unsigned long bfin_cli(void)
 /*
  * Hard, untraced CPU interrupt flag manipulation and access.
  */
-static inline void __hard_local_irq_disable(void)
+static inline notrace void __hard_local_irq_disable(void)
 {
 	bfin_cli();
 }
 
-static inline void __hard_local_irq_enable(void)
+static inline notrace void __hard_local_irq_enable(void)
 {
 	bfin_sti(bfin_irq_flags);
 }
 
-static inline unsigned long hard_local_save_flags(void)
+static inline notrace unsigned long hard_local_save_flags(void)
 {
 	return bfin_read_IMASK();
 }
 
-static inline unsigned long __hard_local_irq_save(void)
+static inline notrace unsigned long __hard_local_irq_save(void)
 {
 	unsigned long flags;
 	flags = bfin_cli();
@@ -65,18 +65,18 @@ static inline unsigned long __hard_local_irq_save(void)
 	return flags;
 }
 
-static inline int hard_irqs_disabled_flags(unsigned long flags)
+static inline notrace int hard_irqs_disabled_flags(unsigned long flags)
 {
 	return (flags & ~0x3f) == 0;
 }
 
-static inline int hard_irqs_disabled(void)
+static inline notrace int hard_irqs_disabled(void)
 {
 	unsigned long flags = hard_local_save_flags();
 	return hard_irqs_disabled_flags(flags);
 }
 
-static inline void __hard_local_irq_restore(unsigned long flags)
+static inline notrace void __hard_local_irq_restore(unsigned long flags)
 {
 	if (!hard_irqs_disabled_flags(flags))
 		__hard_local_irq_enable();
@@ -113,31 +113,31 @@ void ipipe_check_context(struct ipipe_domain *ipd);
 /*
  * Interrupt pipe interface to linux/irqflags.h.
  */
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	__check_irqop_context();
 	__ipipe_stall_root();
 	barrier();
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	barrier();
 	__check_irqop_context();
 	__ipipe_unstall_root();
 }
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	return __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags;
 }
 
-static inline int arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
 {
 	return flags == bfin_no_irqs;
 }
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags;
 
@@ -148,13 +148,13 @@ static inline unsigned long arch_local_irq_save(void)
 	return flags;
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	__check_irqop_context();
 	__ipipe_restore_root(flags == bfin_no_irqs);
 }
 
-static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real)
+static inline notrace unsigned long arch_mangle_irq_bits(int virt, unsigned long real)
 {
 	/*
 	 * Merge virtual and real interrupt mask bits into a single
@@ -163,7 +163,7 @@ static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real)
 	return (real & ~(1 << 31)) | ((virt != 0) << 31);
 }
 
-static inline int arch_demangle_irq_bits(unsigned long *x)
+static inline notrace int arch_demangle_irq_bits(unsigned long *x)
 {
 	int virt = (*x & (1 << 31)) != 0;
 	*x &= ~(1L << 31);
@@ -174,7 +174,7 @@ static inline int arch_demangle_irq_bits(unsigned long *x)
  * Interface to various arch routines that may be traced.
  */
 #ifdef CONFIG_IPIPE_TRACE_IRQSOFF
-static inline void hard_local_irq_disable(void)
+static inline notrace void hard_local_irq_disable(void)
 {
 	if (!hard_irqs_disabled()) {
 		__hard_local_irq_disable();
@@ -182,7 +182,7 @@ static inline void hard_local_irq_disable(void)
 	}
 }
 
-static inline void hard_local_irq_enable(void)
+static inline notrace void hard_local_irq_enable(void)
 {
 	if (hard_irqs_disabled()) {
 		ipipe_trace_end(0x80000000);
@@ -190,7 +190,7 @@ static inline void hard_local_irq_enable(void)
 	}
 }
 
-static inline unsigned long hard_local_irq_save(void)
+static inline notrace unsigned long hard_local_irq_save(void)
 {
 	unsigned long flags = hard_local_save_flags();
 	if (!hard_irqs_disabled_flags(flags)) {
@@ -200,7 +200,7 @@ static inline unsigned long hard_local_irq_save(void)
 	return flags;
 }
 
-static inline void hard_local_irq_restore(unsigned long flags)
+static inline notrace void hard_local_irq_restore(unsigned long flags)
 {
 	if (!hard_irqs_disabled_flags(flags)) {
 		ipipe_trace_end(0x80000001);
-- 
1.7.5.4




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

* [patch 04/11] ia64/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (2 preceding siblings ...)
  2011-07-02  3:04 ` [patch 03/11] blackfin/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-02  3:04 ` [patch 05/11] microblaze/irqs: " Steven Rostedt
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Tony Luck, Fenghua Yu

[-- Attachment #1: 0004-ia64-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 3020 bytes --]

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.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/ia64/include/asm/irqflags.h |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/ia64/include/asm/irqflags.h b/arch/ia64/include/asm/irqflags.h
index f82d6be..82d4c5e 100644
--- a/arch/ia64/include/asm/irqflags.h
+++ b/arch/ia64/include/asm/irqflags.h
@@ -12,7 +12,7 @@
 
 #ifdef CONFIG_IA64_DEBUG_IRQ
 extern unsigned long last_cli_ip;
-static inline void arch_maybe_save_ip(unsigned long flags)
+static inline notrace void arch_maybe_save_ip(unsigned long flags)
 {
 	if (flags & IA64_PSR_I)
 		last_cli_ip = ia64_getreg(_IA64_REG_IP);
@@ -29,7 +29,7 @@ static inline void arch_maybe_save_ip(unsigned long flags)
  *   and that writes to PSR.mfl
  */
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	ia64_stop();
 #ifdef CONFIG_PARAVIRT
@@ -39,7 +39,7 @@ static inline unsigned long arch_local_save_flags(void)
 #endif
 }
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags = arch_local_save_flags();
 
@@ -49,7 +49,7 @@ static inline unsigned long arch_local_irq_save(void)
 	return flags;
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 #ifdef CONFIG_IA64_DEBUG_IRQ
 	arch_local_irq_save();
@@ -59,14 +59,14 @@ static inline void arch_local_irq_disable(void)
 #endif
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	ia64_stop();
 	ia64_ssm(IA64_PSR_I);
 	ia64_srlz_d();
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 #ifdef CONFIG_IA64_DEBUG_IRQ
 	unsigned long old_psr = arch_local_save_flags();
@@ -75,17 +75,17 @@ static inline void arch_local_irq_restore(unsigned long flags)
 	arch_maybe_save_ip(old_psr & ~flags);
 }
 
-static inline bool arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
 {
 	return (flags & IA64_PSR_I) == 0;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline notrace bool arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
 
-static inline void arch_safe_halt(void)
+static inline notrace void arch_safe_halt(void)
 {
 	ia64_pal_halt_light();	/* PAL_HALT_LIGHT */
 }
-- 
1.7.5.4




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

* [patch 05/11] microblaze/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (3 preceding siblings ...)
  2011-07-02  3:04 ` [patch 04/11] ia64/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-05 10:43   ` Michal Simek
  2011-07-02  3:04 ` [patch 06/11] mips/irqs: " Steven Rostedt
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Michal Simek

[-- Attachment #1: 0005-microblaze-irqs-Do-not-trace-arch_local_-irq_-functi.patch --]
[-- Type: text/plain, Size: 3551 bytes --]

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.

Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/microblaze/include/asm/irqflags.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/microblaze/include/asm/irqflags.h b/arch/microblaze/include/asm/irqflags.h
index c4532f0..c9a6262 100644
--- a/arch/microblaze/include/asm/irqflags.h
+++ b/arch/microblaze/include/asm/irqflags.h
@@ -14,7 +14,7 @@
 
 #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags;
 	asm volatile("	msrclr %0, %1	\n"
@@ -25,7 +25,7 @@ static inline unsigned long arch_local_irq_save(void)
 	return flags;
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	/* this uses r0 without declaring it - is that correct? */
 	asm volatile("	msrclr r0, %0	\n"
@@ -35,7 +35,7 @@ static inline void arch_local_irq_disable(void)
 		     : "memory");
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	/* this uses r0 without declaring it - is that correct? */
 	asm volatile("	msrset	r0, %0	\n"
@@ -47,7 +47,7 @@ static inline void arch_local_irq_enable(void)
 
 #else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags, tmp;
 	asm volatile ("	mfs	%0, rmsr	\n"
@@ -61,7 +61,7 @@ static inline unsigned long arch_local_irq_save(void)
 	return flags;
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	unsigned long tmp;
 	asm volatile("	mfs	%0, rmsr	\n"
@@ -74,7 +74,7 @@ static inline void arch_local_irq_disable(void)
 		     : "memory");
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	unsigned long tmp;
 	asm volatile("	mfs	%0, rmsr	\n"
@@ -89,7 +89,7 @@ static inline void arch_local_irq_enable(void)
 
 #endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	unsigned long flags;
 	asm volatile("	mfs	%0, rmsr	\n"
@@ -100,7 +100,7 @@ static inline unsigned long arch_local_save_flags(void)
 	return flags;
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	asm volatile("	mts	rmsr, %0	\n"
 		     "	nop			\n"
@@ -109,12 +109,12 @@ static inline void arch_local_irq_restore(unsigned long flags)
 		     : "memory");
 }
 
-static inline bool arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
 {
 	return (flags & MSR_IE) == 0;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline notrace bool arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
-- 
1.7.5.4




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

* [patch 06/11] mips/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (4 preceding siblings ...)
  2011-07-02  3:04 ` [patch 05/11] microblaze/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-02  3:04 ` [patch 07/11] parisc/irqs: " Steven Rostedt
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Ralf Baechle

[-- Attachment #1: 0006-mips-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 2565 bytes --]

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.

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/mips/include/asm/irqflags.h |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/mips/include/asm/irqflags.h b/arch/mips/include/asm/irqflags.h
index 309cbcd..299d75d 100644
--- a/arch/mips/include/asm/irqflags.h
+++ b/arch/mips/include/asm/irqflags.h
@@ -40,7 +40,7 @@ __asm__(
 
 extern void smtc_ipi_replay(void);
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 #ifdef CONFIG_MIPS_MT_SMTC
 	/*
@@ -97,7 +97,7 @@ __asm__(
 	"	.set	pop						\n"
 	"	.endm							\n");
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	__asm__ __volatile__(
 		"arch_local_irq_disable"
@@ -118,7 +118,7 @@ __asm__(
 	"	.set	pop						\n"
 	"	.endm							\n");
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	unsigned long flags;
 	asm volatile("arch_local_save_flags %0" : "=r" (flags));
@@ -150,7 +150,7 @@ __asm__(
 	"	.set	pop						\n"
 	"	.endm							\n");
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags;
 	asm volatile("arch_local_irq_save\t%0"
@@ -201,7 +201,7 @@ __asm__(
 	"	.endm							\n");
 
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	unsigned long __tmp1;
 
@@ -222,7 +222,7 @@ static inline void arch_local_irq_restore(unsigned long flags)
 		: "memory");
 }
 
-static inline void __arch_local_irq_restore(unsigned long flags)
+static inline notrace void __arch_local_irq_restore(unsigned long flags)
 {
 	unsigned long __tmp1;
 
@@ -233,7 +233,7 @@ static inline void __arch_local_irq_restore(unsigned long flags)
 		: "memory");
 }
 
-static inline int arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
 {
 #ifdef CONFIG_MIPS_MT_SMTC
 	/*
-- 
1.7.5.4




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

* [patch 07/11] parisc/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (5 preceding siblings ...)
  2011-07-02  3:04 ` [patch 06/11] mips/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-02  3:04 ` [patch 08/11] powerpc/irqs: " Steven Rostedt
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Kyle McMartin, Helge Deller, James E.J. Bottomley

[-- Attachment #1: 0007-parisc-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 2316 bytes --]

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.

Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/parisc/include/asm/irqflags.h |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/parisc/include/asm/irqflags.h b/arch/parisc/include/asm/irqflags.h
index 34f9cb9..98d706b 100644
--- a/arch/parisc/include/asm/irqflags.h
+++ b/arch/parisc/include/asm/irqflags.h
@@ -4,41 +4,41 @@
 #include <linux/types.h>
 #include <asm/psw.h>
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	unsigned long flags;
 	asm volatile("ssm 0, %0" : "=r" (flags) : : "memory");
 	return flags;
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	asm volatile("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory");
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	asm volatile("ssm %0,%%r0\n" : : "i" (PSW_I) : "memory");
 }
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags;
 	asm volatile("rsm %1,%0" : "=r" (flags) : "i" (PSW_I) : "memory");
 	return flags;
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	asm volatile("mtsm %0" : : "r" (flags) : "memory");
 }
 
-static inline bool arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
 {
 	return (flags & PSW_I) == 0;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline notrace bool arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
-- 
1.7.5.4




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

* [patch 08/11] powerpc/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (6 preceding siblings ...)
  2011-07-02  3:04 ` [patch 07/11] parisc/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-02  3:04 ` [patch 09/11] s390/irqs: " Steven Rostedt
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Benjamin Herrenschmidt, Paul Mackerras

[-- Attachment #1: 0008-powerpc-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 3907 bytes --]

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.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/powerpc/include/asm/hw_irq.h |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index bb712c9..c8e651f 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -16,7 +16,7 @@ extern void timer_interrupt(struct pt_regs *);
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	unsigned long flags;
 
@@ -28,7 +28,7 @@ static inline unsigned long arch_local_save_flags(void)
 	return flags;
 }
 
-static inline unsigned long arch_local_irq_disable(void)
+static inline notrace unsigned long arch_local_irq_disable(void)
 {
 	unsigned long flags, zero;
 
@@ -44,22 +44,22 @@ static inline unsigned long arch_local_irq_disable(void)
 extern void arch_local_irq_restore(unsigned long);
 extern void iseries_handle_interrupts(void);
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	arch_local_irq_restore(1);
 }
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	return arch_local_irq_disable();
 }
 
-static inline bool arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
 {
 	return flags == 0;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline notrace bool arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
@@ -83,12 +83,12 @@ static inline bool arch_irqs_disabled(void)
 
 #define SET_MSR_EE(x)	mtmsr(x)
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	return mfmsr();
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 #if defined(CONFIG_BOOKE)
 	asm volatile("wrtee %0" : : "r" (flags) : "memory");
@@ -97,7 +97,7 @@ static inline void arch_local_irq_restore(unsigned long flags)
 #endif
 }
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags = arch_local_save_flags();
 #ifdef CONFIG_BOOKE
@@ -108,7 +108,7 @@ static inline unsigned long arch_local_irq_save(void)
 	return flags;
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 #ifdef CONFIG_BOOKE
 	asm volatile("wrteei 0" : : : "memory");
@@ -117,7 +117,7 @@ static inline void arch_local_irq_disable(void)
 #endif
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 #ifdef CONFIG_BOOKE
 	asm volatile("wrteei 1" : : : "memory");
@@ -127,12 +127,12 @@ static inline void arch_local_irq_enable(void)
 #endif
 }
 
-static inline bool arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
 {
 	return (flags & MSR_EE) == 0;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline notrace bool arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
-- 
1.7.5.4




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

* [patch 09/11] s390/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (7 preceding siblings ...)
  2011-07-02  3:04 ` [patch 08/11] powerpc/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-04  8:10   ` Martin Schwidefsky
  2011-07-02  3:04 ` [patch 10/11] sh/unicore32/irqs: " Steven Rostedt
  2011-07-02  3:04 ` [patch 11/11] sparc/irqs: " Steven Rostedt
  10 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Martin Schwidefsky, Heiko Carstens

[-- Attachment #1: 0009-s390-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 2266 bytes --]

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.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/s390/include/asm/irqflags.h |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/s390/include/asm/irqflags.h b/arch/s390/include/asm/irqflags.h
index 865d6d8..38fdf45 100644
--- a/arch/s390/include/asm/irqflags.h
+++ b/arch/s390/include/asm/irqflags.h
@@ -29,42 +29,42 @@
 })
 
 /* set system mask. */
-static inline void __arch_local_irq_ssm(unsigned long flags)
+static inline notrace void __arch_local_irq_ssm(unsigned long flags)
 {
 	asm volatile("ssm   %0" : : "Q" (flags) : "memory");
 }
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	return __arch_local_irq_stosm(0x00);
 }
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	return __arch_local_irq_stnsm(0xfc);
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	arch_local_irq_save();
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	__arch_local_irq_stosm(0x03);
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	__arch_local_irq_ssm(flags);
 }
 
-static inline bool arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
 {
 	return !(flags & (3UL << (BITS_PER_LONG - 8)));
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline notrace bool arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
-- 
1.7.5.4




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

* [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (8 preceding siblings ...)
  2011-07-02  3:04 ` [patch 09/11] s390/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-04  1:56   ` Guan Xuetao
  2011-07-02  3:04 ` [patch 11/11] sparc/irqs: " Steven Rostedt
  10 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Thomas Gleixner, Paul Mundt, Guan Xuetao

[-- Attachment #1: 0010-sh-unicore32-irqs-Do-not-trace-arch_local_-irq_-func.patch --]
[-- Type: text/plain, Size: 2761 bytes --]

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());
 }
-- 
1.7.5.4




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

* [patch 11/11] sparc/irqs: Do not trace arch_local_{*,irq_*} functions
       [not found] <20110702030435.308336775@goodmis.org>
                   ` (9 preceding siblings ...)
  2011-07-02  3:04 ` [patch 10/11] sh/unicore32/irqs: " Steven Rostedt
@ 2011-07-02  3:04 ` Steven Rostedt
  2011-07-02  4:11   ` David Miller
  10 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02  3:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, David S. Miller

[-- Attachment #1: 0011-sparc-irqs-Do-not-trace-arch_local_-irq_-functions.patch --]
[-- Type: text/plain, Size: 3490 bytes --]

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.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/sparc/include/asm/irqflags_32.h |    8 ++++----
 arch/sparc/include/asm/irqflags_64.h |   14 +++++++-------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/sparc/include/asm/irqflags_32.h b/arch/sparc/include/asm/irqflags_32.h
index d4d0711..1484890 100644
--- a/arch/sparc/include/asm/irqflags_32.h
+++ b/arch/sparc/include/asm/irqflags_32.h
@@ -18,7 +18,7 @@ extern void arch_local_irq_restore(unsigned long);
 extern unsigned long arch_local_irq_save(void);
 extern void arch_local_irq_enable(void);
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	unsigned long flags;
 
@@ -26,17 +26,17 @@ static inline unsigned long arch_local_save_flags(void)
 	return flags;
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	arch_local_irq_save();
 }
 
-static inline bool arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
 {
 	return (flags & PSR_PIL) != 0;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline notrace bool arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
diff --git a/arch/sparc/include/asm/irqflags_64.h b/arch/sparc/include/asm/irqflags_64.h
index aab969c..23cd27f 100644
--- a/arch/sparc/include/asm/irqflags_64.h
+++ b/arch/sparc/include/asm/irqflags_64.h
@@ -14,7 +14,7 @@
 
 #ifndef __ASSEMBLY__
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	unsigned long flags;
 
@@ -26,7 +26,7 @@ static inline unsigned long arch_local_save_flags(void)
 	return flags;
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	__asm__ __volatile__(
 		"wrpr	%0, %%pil"
@@ -36,7 +36,7 @@ static inline void arch_local_irq_restore(unsigned long flags)
 	);
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	__asm__ __volatile__(
 		"wrpr	%0, %%pil"
@@ -46,7 +46,7 @@ static inline void arch_local_irq_disable(void)
 	);
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	__asm__ __volatile__(
 		"wrpr	0, %%pil"
@@ -56,17 +56,17 @@ static inline void arch_local_irq_enable(void)
 	);
 }
 
-static inline int arch_irqs_disabled_flags(unsigned long flags)
+static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
 {
 	return (flags > 0);
 }
 
-static inline int arch_irqs_disabled(void)
+static inline notrace int arch_irqs_disabled(void)
 {
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
 
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags, tmp;
 
-- 
1.7.5.4




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

* Re: [patch 11/11] sparc/irqs: Do not trace arch_local_{*,irq_*} functions
  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
  0 siblings, 1 reply; 33+ messages in thread
From: David Miller @ 2011-07-02  4:11 UTC (permalink / raw)
  To: rostedt; +Cc: linux-kernel, akpm

From: Steven Rostedt <rostedt@goodmis.org>
Date: Fri, 01 Jul 2011 23:04:46 -0400

> 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.
> 
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Acked-by: David S. Miller <davem@davemloft.net>

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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  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:40   ` Mike Frysinger
  2011-07-05 19:07   ` Mike Frysinger
  2 siblings, 1 reply; 33+ messages in thread
From: Mike Frysinger @ 2011-07-02  6:50 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton

On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
> 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.

what about putting the markings in include/asm-generic/irqflags.h ?
then you wouldnt have to update every arch (or at least, not as much).
-mike

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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-02  6:50   ` Mike Frysinger
@ 2011-07-02 16:11     ` Steven Rostedt
  2011-07-02 16:39       ` Mike Frysinger
  0 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-02 16:11 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-kernel, Andrew Morton

On Sat, 2011-07-02 at 02:50 -0400, Mike Frysinger wrote:
> On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
> > 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.
> 
> what about putting the markings in include/asm-generic/irqflags.h ?
> then you wouldnt have to update every arch (or at least, not as much).

One of my patches do that, but it only helps superH, as that's the only
arch that uses that header and implements function tracing.

-- Steve



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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-02 16:11     ` Steven Rostedt
@ 2011-07-02 16:39       ` Mike Frysinger
  0 siblings, 0 replies; 33+ messages in thread
From: Mike Frysinger @ 2011-07-02 16:39 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton

On Sat, Jul 2, 2011 at 12:11, Steven Rostedt wrote:
> On Sat, 2011-07-02 at 02:50 -0400, Mike Frysinger wrote:
>> On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
>> > 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.
>>
>> what about putting the markings in include/asm-generic/irqflags.h ?
>> then you wouldnt have to update every arch (or at least, not as much).
>
> One of my patches do that, but it only helps superH, as that's the only
> arch that uses that header and implements function tracing.

hmm, i thought Blackfin was using that too.  guess i'll have to fix that ;).
-mike

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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-02  3:04 ` [patch 03/11] blackfin/irqs: " Steven Rostedt
  2011-07-02  6:50   ` Mike Frysinger
@ 2011-07-02 16:40   ` Mike Frysinger
  2011-07-05 12:51     ` Steven Rostedt
  2011-07-05 19:07   ` Mike Frysinger
  2 siblings, 1 reply; 33+ messages in thread
From: Mike Frysinger @ 2011-07-02 16:40 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton

On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
> 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.

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

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

* Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-02  3:04 ` [patch 10/11] sh/unicore32/irqs: " Steven Rostedt
@ 2011-07-04  1:56   ` Guan Xuetao
  2011-07-05 12:50     ` Steven Rostedt
  0 siblings, 1 reply; 33+ messages in thread
From: Guan Xuetao @ 2011-07-04  1:56 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton, Thomas Gleixner, Paul Mundt

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());
>  }



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

* Re: [patch 09/11] s390/irqs: Do not trace arch_local_{*,irq_*} functions
  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
  0 siblings, 1 reply; 33+ messages in thread
From: Martin Schwidefsky @ 2011-07-04  8:10 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton, Heiko Carstens

On Fri, 01 Jul 2011 23:04:44 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> 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.
> 
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Applied to git390, thanks Steven.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


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

* Re: [patch 05/11] microblaze/irqs: Do not trace arch_local_{*,irq_*} functions
  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
  0 siblings, 1 reply; 33+ messages in thread
From: Michal Simek @ 2011-07-05 10:43 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton

> 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.
> 
> Cc: Michal Simek <monstr@monstr.eu>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Applied.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [patch 11/11] sparc/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-02  4:11   ` David Miller
@ 2011-07-05 12:49     ` Steven Rostedt
  2011-07-06  6:43       ` David Miller
  0 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-05 12:49 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, akpm

On Fri, 2011-07-01 at 21:11 -0700, David Miller wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
> Date: Fri, 01 Jul 2011 23:04:46 -0400
> 
> > 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.
> > 
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> 
> Acked-by: David S. Miller <davem@davemloft.net>

Thanks David!

Could you pull the patch into your tree. It's not dependent on any other
patch, so I feel more comfortable that it goes through yours than the
tracing tree.

Thanks,

-- Steve



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

* Re: [patch 05/11] microblaze/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-05 10:43   ` Michal Simek
@ 2011-07-05 12:49     ` Steven Rostedt
  0 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-05 12:49 UTC (permalink / raw)
  To: monstr; +Cc: linux-kernel, Andrew Morton

On Tue, 2011-07-05 at 12:43 +0200, Michal Simek wrote:
> > 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.
> > 
> > Cc: Michal Simek <monstr@monstr.eu>
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> 
> Applied.
> 

Thanks!

-- Steve



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

* Re: [patch 09/11] s390/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-04  8:10   ` Martin Schwidefsky
@ 2011-07-05 12:49     ` Steven Rostedt
  0 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-05 12:49 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: linux-kernel, Andrew Morton, Heiko Carstens

On Mon, 2011-07-04 at 10:10 +0200, Martin Schwidefsky wrote:
> On Fri, 01 Jul 2011 23:04:44 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > 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.
> > 
> > Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> > Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> 
> Applied to git390, thanks Steven.
> 

Thanks Martin,

-- Steve



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

* Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-04  1:56   ` Guan Xuetao
@ 2011-07-05 12:50     ` Steven Rostedt
  2011-07-11  3:34       ` Paul Mundt
  0 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-05 12:50 UTC (permalink / raw)
  To: gxt; +Cc: linux-kernel, Andrew Morton, Thomas Gleixner, Paul Mundt

On Mon, 2011-07-04 at 09:56 +0800, Guan Xuetao wrote:
> It looks good to me.
> 
> Thanks & Regards.
> 

Thanks!

Are you or Paul going to pull it into the sh tree?

-- Steve



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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-02 16:40   ` Mike Frysinger
@ 2011-07-05 12:51     ` Steven Rostedt
  2011-07-05 16:20       ` Mike Frysinger
  0 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-05 12:51 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-kernel, Andrew Morton

On Sat, 2011-07-02 at 12:40 -0400, Mike Frysinger wrote:
> On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
> > 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.
> 
> Acked-by: Mike Frysinger <vapier@gentoo.org>

Thanks! Are you going to pull it into the blackfin tree? It's not
dependent on any other patch.

-- Steve



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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-05 12:51     ` Steven Rostedt
@ 2011-07-05 16:20       ` Mike Frysinger
  0 siblings, 0 replies; 33+ messages in thread
From: Mike Frysinger @ 2011-07-05 16:20 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton

On Tue, Jul 5, 2011 at 08:51, Steven Rostedt wrote:
> On Sat, 2011-07-02 at 12:40 -0400, Mike Frysinger wrote:
>> On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
>> > 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.
>>
>> Acked-by: Mike Frysinger <vapier@gentoo.org>
>
> Thanks! Are you going to pull it into the blackfin tree? It's not
> dependent on any other patch.

in that case, i'll merge it
-mike

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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-02  3:04 ` [patch 03/11] blackfin/irqs: " Steven Rostedt
  2011-07-02  6:50   ` Mike Frysinger
  2011-07-02 16:40   ` Mike Frysinger
@ 2011-07-05 19:07   ` Mike Frysinger
  2011-07-05 19:13     ` Steven Rostedt
  2 siblings, 1 reply; 33+ messages in thread
From: Mike Frysinger @ 2011-07-05 19:07 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton

On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

for the pedantic/anal, the Author does not match the signed-off-by tag
-mike

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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-05 19:07   ` Mike Frysinger
@ 2011-07-05 19:13     ` Steven Rostedt
  2011-07-05 19:25       ` Mike Frysinger
  0 siblings, 1 reply; 33+ messages in thread
From: Steven Rostedt @ 2011-07-05 19:13 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-kernel, Andrew Morton

On Tue, 2011-07-05 at 15:07 -0400, Mike Frysinger wrote:
> On Fri, Jul 1, 2011 at 23:04, Steven Rostedt wrote:
> > From: Steven Rostedt <srostedt@redhat.com>
> >
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> 
> for the pedantic/anal, the Author does not match the signed-off-by tag

My patches never do ;)

I author patches to give credit to the company that pays me to write
them. But I rather have people email me to my goodmis.org account,
because I may not see my redhat.com account for a week. I found that
people seem to email me more based on my Signed-off-by than my author
email, so that is the one that I do the goodmis.org account with.

Although, I still get people emailing me to my redhat account every so
often, but they can wait a week for me to respond ;)

-- Steve



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

* Re: [patch 03/11] blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-05 19:13     ` Steven Rostedt
@ 2011-07-05 19:25       ` Mike Frysinger
  0 siblings, 0 replies; 33+ messages in thread
From: Mike Frysinger @ 2011-07-05 19:25 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton

On Tue, Jul 5, 2011 at 15:13, Steven Rostedt wrote:
> I author patches to give credit to the company that pays me to write
> them. But I rather have people email me to my goodmis.org account,
> because I may not see my redhat.com account for a week. I found that
> people seem to email me more based on my Signed-off-by than my author
> email, so that is the one that I do the goodmis.org account with.

that's so logical that i think i might start stealing that idea ...
-mike

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

* Re: [patch 11/11] sparc/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-05 12:49     ` Steven Rostedt
@ 2011-07-06  6:43       ` David Miller
  0 siblings, 0 replies; 33+ messages in thread
From: David Miller @ 2011-07-06  6:43 UTC (permalink / raw)
  To: rostedt; +Cc: linux-kernel, akpm

From: Steven Rostedt <rostedt@goodmis.org>
Date: Tue, 05 Jul 2011 08:49:06 -0400

> Could you pull the patch into your tree. It's not dependent on any other
> patch, so I feel more comfortable that it goes through yours than the
> tracing tree.

Will do.

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

* Re: [patch 01/11] x86/irqs: Do not trace arch_local_{*,irq_*} functions
  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
  1 sibling, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-07  0:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Ingo Molnar, Thomas Gleixner, H. Peter Anvin

On Fri, 2011-07-01 at 23:04 -0400, Steven Rostedt wrote:

> The simple solution is to just mark them as notrace. I had to add the
> <linux/types.h> for this file to include the notrace tag.
> 
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: H. Peter Anvin <hpa@zytor.com>

Ingo, Thomas or Peter,

Could one of you pull this patch into tip? It probably could still go
into the 3.0 release, as it's just adding notrace annotation and should
be very small chance to cause any regressions.

-- Steve



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

* [tip:perf/core] tracing, x86/irq: Do not trace arch_local_{*,irq_*}() functions
  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-bot for Steven Rostedt
  1 sibling, 0 replies; 33+ messages in thread
From: tip-bot for Steven Rostedt @ 2011-07-07 21:43 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, rostedt, srostedt, tglx, mingo

Commit-ID:  e08fbb78f03fe2c4f88824faf6f51ce6af185e11
Gitweb:     http://git.kernel.org/tip/e08fbb78f03fe2c4f88824faf6f51ce6af185e11
Author:     Steven Rostedt <srostedt@redhat.com>
AuthorDate: Fri, 1 Jul 2011 23:04:36 -0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 7 Jul 2011 19:22:32 +0200

tracing, x86/irq: Do not trace arch_local_{*,irq_*}() functions

I triggered a triple fault with gcc 4.5.1 because it did not
honor the inline annotation to arch_local_save_flags() function
and that function was added to the pool of functions traced by
the function tracer.

When preempt_schedule() called arch_local_save_flags() (called
by irqs_disabled()), it was traced, but the first thing the
function tracer does is disable preemption. When it enables
preemption, the NEED_RESCHED flag will not have been cleared and
the preemption check will trigger the call to preempt_schedule()
again.

Although the dynamic function tracer crashed immediately, the
static version of the function tracer (CONFIG_DYNAMIC_FTRACE is
not set) actually was able to show where the problem was.

 swapper-1       3.N.. 103885us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103886us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103886us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103887us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103887us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103888us : arch_local_save_flags <-preempt_schedule
 swapper-1       3.N.. 103888us : arch_local_save_flags <-preempt_schedule

It went on for a while before it triple faulted with a corrupted
stack.

The arch_local_save_flags and arch_local_irq_* functions should
not be traced. Even though they are marked as inline, gcc may
still make them a function and enable tracing of them.

The simple solution is to just mark them as notrace. I had to
add the <linux/types.h> for this file to include the notrace
tag.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20110702033852.733414762@goodmis.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/irqflags.h |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index 5745ce8..bba3cf8 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -60,23 +60,24 @@ static inline void native_halt(void)
 #include <asm/paravirt.h>
 #else
 #ifndef __ASSEMBLY__
+#include <linux/types.h>
 
-static inline unsigned long arch_local_save_flags(void)
+static inline notrace unsigned long arch_local_save_flags(void)
 {
 	return native_save_fl();
 }
 
-static inline void arch_local_irq_restore(unsigned long flags)
+static inline notrace void arch_local_irq_restore(unsigned long flags)
 {
 	native_restore_fl(flags);
 }
 
-static inline void arch_local_irq_disable(void)
+static inline notrace void arch_local_irq_disable(void)
 {
 	native_irq_disable();
 }
 
-static inline void arch_local_irq_enable(void)
+static inline notrace void arch_local_irq_enable(void)
 {
 	native_irq_enable();
 }
@@ -102,7 +103,7 @@ static inline void halt(void)
 /*
  * For spinlocks, etc:
  */
-static inline unsigned long arch_local_irq_save(void)
+static inline notrace unsigned long arch_local_irq_save(void)
 {
 	unsigned long flags = arch_local_save_flags();
 	arch_local_irq_disable();

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

* Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-05 12:50     ` Steven Rostedt
@ 2011-07-11  3:34       ` Paul Mundt
  2011-07-13  1:36         ` Steven Rostedt
  0 siblings, 1 reply; 33+ messages in thread
From: Paul Mundt @ 2011-07-11  3:34 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: gxt, linux-kernel, Andrew Morton, Thomas Gleixner

On Tue, Jul 05, 2011 at 08:50:30AM -0400, Steven Rostedt wrote:
> On Mon, 2011-07-04 at 09:56 +0800, Guan Xuetao wrote:
> > It looks good to me.
> > 
> > Thanks & Regards.
> > 
> 
> Thanks!
> 
> Are you or Paul going to pull it into the sh tree?
> 
I don't mind pulling it in, but it's probably easier to simply have it
lumped with the rest of the changes.

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

* Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
  2011-07-11  3:34       ` Paul Mundt
@ 2011-07-13  1:36         ` Steven Rostedt
  0 siblings, 0 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-07-13  1:36 UTC (permalink / raw)
  To: Paul Mundt; +Cc: gxt, linux-kernel, Andrew Morton, Thomas Gleixner

On Mon, 2011-07-11 at 12:34 +0900, Paul Mundt wrote:
> On Tue, Jul 05, 2011 at 08:50:30AM -0400, Steven Rostedt wrote:
> > 
> > Are you or Paul going to pull it into the sh tree?
> > 
> I don't mind pulling it in, but it's probably easier to simply have it
> lumped with the rest of the changes.

Hi Paul,

This "patch series" was just a email to all arch maintainers to the code
I modified. I'm not pulling this into any branch nor have I asked for
this series to go anywhere. This change is not dependent on any other
change nor is any other change dependent on this one. So I figured that
each maintainer could pull it in at their own free will.

Thanks!

-- Steve



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

end of thread, other threads:[~2011-07-13  1:37 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
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

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.