blob: 7e1a7ed7a3ee4ba3a5b8c99b99173b25d86c9b7e [file] [log] [blame]
From 35b5256e0c4f29f334cc85aaf501ecbc8159c51f Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 2 Apr 2010 10:51:09 +0200
Subject: [PATCH] x86: Fix irq off tracing for 32 bit
commit 35b5256e0c4f29f334cc85aaf501ecbc8159c51f in tip.
John reported a irq off tracing splat with the following debug info:
irq event stamp: 5988
hardirqs last enabled at (5987): [<c13e4696>]
_raw_spin_unlock_irqrestore+0x49/0x8f
hardirqs last disabled at (5988): [<c13e4ce3>] call_function_interrupt+0x2f/0x3c
softirqs last enabled at (0): [<c10470a6>] copy_process+0x3b6/0x15ad
softirqs last disabled at (0): [<(null)>] (null)
8139too Fast Ethernet driver 0.9.28
irq event stamp: 10638
hardirqs last enabled at (10637): [<c13e4696>]
_raw_spin_unlock_irqrestore+0x49/0x8f
hardirqs last disabled at (10638): [<c13e4feb>] apic_timer_interrupt+0x2f/0x3c
softirqs last enabled at (0): [<c10470a6>] copy_process+0x3b6/0x15ad
softirqs last disabled at (0): [<(null)>] (null)
irq event stamp: 2914
hardirqs last enabled at (2913): [<c13e4696>]
_raw_spin_unlock_irqrestore+0x49/0x8f
hardirqs last disabled at (2914): [<c13e4feb>] apic_timer_interrupt+0x2f/0x3c
softirqs last enabled at (0): [<c10470a6>] copy_process+0x3b6/0x15ad
softirqs last disabled at (0): [<(null)>] (null)
There is a TRACE_IRQ_IRET annotation missing in the preempt code path.
Reported-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 57d3849..3dc8593 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -375,15 +375,18 @@ END(ret_from_exception)
ENTRY(resume_kernel)
DISABLE_INTERRUPTS(CLBR_ANY)
cmpl $0,TI_preempt_count(%ebp) # non-zero preempt_count ?
- jnz restore_nocheck
+ jnz restore_nocheck_trace
need_resched:
movl TI_flags(%ebp), %ecx # need_resched set ?
testb $_TIF_NEED_RESCHED, %cl
- jz restore_nocheck
+ jz restore_nocheck_trace
testl $X86_EFLAGS_IF,PT_EFLAGS(%esp) # interrupts off (exception path) ?
- jz restore_nocheck
+ jz restore_nocheck_trace
call preempt_schedule_irq
jmp need_resched
+restore_nocheck_trace:
+ TRACE_IRQS_IRET
+ jmp restore_nocheck
END(resume_kernel)
#endif
CFI_ENDPROC
--
1.7.1.1