blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
Subsystems (9)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/11 x86/irqs: Do not trace arch_local_{*,irq_*} functions
From: Steven Rostedt <[email protected]>
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.
--- arch/x86/include/asm/irqflags.h | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
arch/x86/include/asm/irqflags.h +6 -5
@@ -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 ();
Signature · 1 line
1.7.5.4
Re: [patch 01/11] x86/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 6 lines · Steven Rostedt
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 <[email protected]>Cc Thomas Gleixner <[email protected]>Cc H. Peter Anvin <[email protected]>
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
[tip:perf/core] tracing, x86/irq: Do not trace arch_local_{*,irq_*}() functions
In reply to Steven RostedtCommit-ID: e08fbb78f03fe2c4f88824faf6f51ce6af185e11 Gitweb: http://git.kernel.org/tip/e08fbb78f03fe2c4f88824faf6f51ce6af185e11 Author: Steven Rostedt <[email protected]> AuthorDate: Fri, 1 Jul 2011 23:04:36 -0400 Committer: Ingo Molnar <[email protected]> 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.
--- arch/x86/include/asm/irqflags.h | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
arch/x86/include/asm/irqflags.h +6 -5
@@ -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 ();
PATCH 2/11 arm/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/arm/include/asm/irqflags.h | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
arch/arm/include/asm/irqflags.h +9 -9
@@ -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) { asmvolatile ( " 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) { asmvolatile ( " 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) { asmvolatile ( " 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 ; }
Signature · 1 line
1.7.5.4
PATCH 3/11 blackfin/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/blackfin/include/asm/irqflags.h | 42 +++++++++++++++++----------------- 1 files changed, 21 insertions(+), 21 deletions(-)
arch/blackfin/include/asm/irqflags.h +21 -21
@@ -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) { asmvolatile ("sti %0;" : :"d" (flags)); } -static inline unsigned long bfin_cli (void ) +static inline notrace unsigned long bfin_cli (void ) {unsigned long flags; asmvolatile ("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 );
Signature · 1 line
1.7.5.4
Quoted 7 lines · Steven Rostedt
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
Quoted 11 lines · Mike Frysinger
Quoted 7 lines · Steven Rostedt
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
Quoted 8 lines · Steven Rostedt
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · Steven Rostedt
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).
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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
Quoted 7 lines · Steven Rostedt
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.
-mike
Quoted 10 lines · Mike Frysinger
Quoted 7 lines · Steven Rostedt
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 <[email protected]>
Thanks! Are you going to pull it into the blackfin tree? It's not dependent on any other patch.
-- Steve
Quoted 8 lines · Steven Rostedt
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · Steven Rostedt
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).
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Add the notrace notation to prevent them from ever being traced.
Acked-by Mike Frysinger <[email protected]>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
Quoted 3 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
Signed-off-by Steven Rostedt <[email protected]>
for the pedantic/anal, the Author does not match the signed-off-by tag -mike
Quoted 6 lines · Mike Frysinger
Quoted 3 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
Signed-off-by Steven Rostedt <[email protected]>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
Quoted 5 lines · Steven Rostedt
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
PATCH 4/11 ia64/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/ia64/include/asm/irqflags.h | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
arch/ia64/include/asm/irqflags.h +9 -9
@@ -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 */ }
Signature · 1 line
1.7.5.4
PATCH 5/11 microblaze/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/microblaze/include/asm/irqflags.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
arch/microblaze/include/asm/irqflags.h +10 -10
@@ -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) { asmvolatile (" 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 ()); }
Signature · 1 line
1.7.5.4
Re: [patch 05/11] microblaze/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 8 lines
From: Steven Rostedt <[email protected]>
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).
Quoted 4 lines
Add the notrace notation to prevent them from ever being traced.
Cc Michal Simek <[email protected]>Signed-off-by Steven Rostedt <[email protected]>
Applied.
Thanks,
Michal
Signature · 4 lines
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
Re: [patch 05/11] microblaze/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 8 lines · Michal Simek
Quoted 8 lines
From: Steven Rostedt <[email protected]>
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).
Quoted 7 lines
Quoted 4 lines
Add the notrace notation to prevent them from ever being traced.
Cc Michal Simek <[email protected]>Signed-off-by Steven Rostedt <[email protected]>Applied.
Thanks!
-- Steve
PATCH 6/11 mips/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/mips/include/asm/irqflags.h | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
arch/mips/include/asm/irqflags.h +7 -7
@@ -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; asmvolatile ("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 /*
Signature · 1 line
1.7.5.4
PATCH 7/11 parisc/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/parisc/include/asm/irqflags.h | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
arch/parisc/include/asm/irqflags.h +7 -7
@@ -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; asmvolatile ("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) { asmvolatile ("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) { asmvolatile ("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; asmvolatile ("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) { asmvolatile ("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 ()); }
Signature · 1 line
1.7.5.4
PATCH 8/11 powerpc/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/powerpc/include/asm/hw_irq.h | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
arch/powerpc/include/asm/hw_irq.h +13 -13
@@ -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 ) asmvolatile ("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 asmvolatile ("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 asmvolatile ("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 ()); }
Signature · 1 line
1.7.5.4
PATCH 9/11 s390/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/s390/include/asm/irqflags.h | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
arch/s390/include/asm/irqflags.h +8 -8
@@ -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) { asmvolatile ("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 ()); }
Signature · 1 line
1.7.5.4
Martin Schwidefsky
AppliedRe: [patch 09/11] s390/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 8 lines · On Fri, 01 Jul 2011 23:04:44 -0400 Steven Rostedt <[email protected]> wrote:
From: Steven Rostedt <[email protected]>
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).
Quoted 5 lines
Add the notrace notation to prevent them from ever being traced.
Cc Martin Schwidefsky <[email protected]>Cc Heiko Carstens <[email protected]>Signed-off-by Steven Rostedt <[email protected]>
Applied to git390, thanks Steven.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Re: [patch 09/11] s390/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 11 lines · Martin Schwidefsky
Quoted 8 lines · On Fri, 01 Jul 2011 23:04:44 -0400 Steven Rostedt <[email protected]> wrote:
From: Steven Rostedt <[email protected]>
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).
Quoted 8 lines
Quoted 5 lines
Add the notrace notation to prevent them from ever being traced.
Cc Martin Schwidefsky <[email protected]>Cc Heiko Carstens <[email protected]>Signed-off-by Steven Rostedt <[email protected]>Applied to git390, thanks Steven.
Thanks Martin,
-- Steve
PATCH 10/11 sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- include/asm-generic/irqflags.h | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
include/asm-generic/irqflags.h +7 -5
@@ -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 ()); }
Signature · 1 line
1.7.5.4
Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
It looks good to me.
Thanks & Regards.
Guan Xuetao
Quoted 81 lines · Steven Rostedt
plain text document attachment (0010-sh-unicore32-irqs-Do-not-trace-arch_local_-irq_-func.patch)
From: Steven Rostedt <[email protected]>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 <[email protected]>Cc Paul Mundt <[email protected]>Cc Guan Xuetao <[email protected]>Signed-off-by Steven Rostedt <[email protected]>--- include/asm-generic/irqflags.h | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)include/asm-generic/irqflags.h +7
-5@@ -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 ()); }
Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 4 lines · Guan Xuetao
It looks good to me.
Thanks & Regards.
Thanks!
Are you or Paul going to pull it into the sh tree?
-- Steve
Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 10 lines · Steven Rostedt
Quoted 4 lines · Guan Xuetao
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.
Re: [patch 10/11] sh/unicore32/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 6 lines · Paul Mundt
Quoted 3 lines · Steven Rostedt
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
PATCH 11/11 sparc/irqs: Do not trace arch_local_{*,irq_*} functions
In reply to a message not in the archiveFrom: Steven Rostedt <[email protected]>
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.
--- arch/sparc/include/asm/irqflags_32.h | 8 ++++---- arch/sparc/include/asm/irqflags_64.h | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-)
arch/sparc/include/asm/irqflags_32.h +4 -4
@@ -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 ()); }
arch/sparc/include/asm/irqflags_64.h +7 -7
@@ -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;
Signature · 1 line
1.7.5.4
Re: [patch 11/11] sparc/irqs: Do not trace arch_local_{*,irq_*} functions
From: Steven Rostedt <[email protected]>
Date: Fri, 01 Jul 2011 23:04:46 -0400
Quoted 8 lines
From: Steven Rostedt <[email protected]>
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).
Quoted 4 lines
Add the notrace notation to prevent them from ever being traced.
Cc "David S. Miller" <[email protected]>Signed-off-by Steven Rostedt <[email protected]>
Re: [patch 11/11] sparc/irqs: Do not trace arch_local_{*,irq_*} functions
Quoted 11 lines · David Miller
From: Steven Rostedt <[email protected]>
Date: Fri, 01 Jul 2011 23:04:46 -0400Quoted 8 lines
From: Steven Rostedt <[email protected]>
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).
Quoted 6 lines
Quoted 4 lines
Add the notrace notation to prevent them from ever being traced.
Cc "David S. Miller" <[email protected]>Signed-off-by Steven Rostedt <[email protected]>Acked-by David S. Miller <[email protected]>
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
David Miller
maintainerRe: [patch 11/11] sparc/irqs: Do not trace arch_local_{*,irq_*} functions
From: Steven Rostedt <[email protected]>
Date: Tue, 05 Jul 2011 08:49:06 -0400
Quoted 3 lines
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.