aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2008-04-25 11:39:01 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-26 18:01:45 -0400
commit7f424a8b08c26dc14ac5c17164014539ac9a5c65 (patch)
treef1f7268ce5215fe4909cb801313a8997d52d1e1e /include/asm-x86
parentc3bf9bc243092c53946fd6d8ebd6dc2f4e572d48 (diff)
fix idle (arch, acpi and apm) and lockdep
OK, so 25-mm1 gave a lockdep error which made me look into this. The first thing that I noticed was the horrible mess; the second thing I saw was hacks like: 71e93d15612c61c2e26a169567becf088e71b8ff The problem is that arch idle routines are somewhat inconsitent with their IRQ state handling and instead of fixing _that_, we go paper over the problem. So the thing I've tried to do is set a standard for idle routines and fix them all up to adhere to that. So the rules are: idle routines are entered with IRQs disabled idle routines will exit with IRQs enabled Nearly all already did this in one form or another. Merge the 32 and 64 bit bits so they no longer have different bugs. As for the actual lockdep warning; __sti_mwait() did a plainly un-annotated irq-enable. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Tested-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/processor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 117343b0c271..2e7974ec77ec 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -722,6 +722,7 @@ static inline void __mwait(unsigned long eax, unsigned long ecx)
722 722
723static inline void __sti_mwait(unsigned long eax, unsigned long ecx) 723static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
724{ 724{
725 trace_hardirqs_on();
725 /* "mwait %eax, %ecx;" */ 726 /* "mwait %eax, %ecx;" */
726 asm volatile("sti; .byte 0x0f, 0x01, 0xc9;" 727 asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
727 :: "a" (eax), "c" (ecx)); 728 :: "a" (eax), "c" (ecx));