Skip to content

Commit

Permalink
MIPS: Fix crash that occurs when function tracing is enabled
Browse files Browse the repository at this point in the history
A recent patch changed some irq routines from inlines to functions.
These routines are called by the tracer code. Now that they're functions,
if they are compiled for function tracing they will call the tracer
and crash the system due to infinite recursion. The fix disables
tracing in these functions by using "notrace" in the function
definition.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Reviewed-by: David Daney <david.daney@cavium.com>
Pathchwork: https://patchwork.linux-mips.org/patch/4564/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Al Cooper authored and Ralf Baechle committed Nov 23, 2012
1 parent 0ec7ec7 commit f93a1a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/mips/lib/mips-atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ __asm__(
" .set pop \n"
" .endm \n");

void arch_local_irq_disable(void)
notrace void arch_local_irq_disable(void)
{
preempt_disable();
__asm__ __volatile__(
Expand Down Expand Up @@ -93,7 +93,7 @@ __asm__(
" .set pop \n"
" .endm \n");

unsigned long arch_local_irq_save(void)
notrace unsigned long arch_local_irq_save(void)
{
unsigned long flags;
preempt_disable();
Expand Down Expand Up @@ -135,7 +135,7 @@ __asm__(
" .set pop \n"
" .endm \n");

void arch_local_irq_restore(unsigned long flags)
notrace void arch_local_irq_restore(unsigned long flags)
{
unsigned long __tmp1;

Expand All @@ -159,7 +159,7 @@ void arch_local_irq_restore(unsigned long flags)
EXPORT_SYMBOL(arch_local_irq_restore);


void __arch_local_irq_restore(unsigned long flags)
notrace void __arch_local_irq_restore(unsigned long flags)
{
unsigned long __tmp1;

Expand Down

0 comments on commit f93a1a0

Please sign in to comment.