[patch 06/11] mips/irqs: Do not trace arch_local_{*,irq_*} functions

From: Steven Rostedt
Date: Fri Jul 01 2011 - 23:47:04 EST


From: Steven Rostedt <srostedt@xxxxxxxxxx>

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@xxxxxxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/