]> git.baikalelectronics.ru Git - kernel.git/commit
fix idle (arch, acpi and apm) and lockdep
authorPeter Zijlstra <peterz@infradead.org>
Fri, 25 Apr 2008 15:39:01 +0000 (17:39 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 26 Apr 2008 22:01:45 +0000 (00:01 +0200)
commitaacbf8c0a2fce3de1e13b823dd28f8e88d5199f5
treef1f7268ce5215fe4909cb801313a8997d52d1e1e
parent653a1154b9a57a3a6dfdca03c2ddf7c231ac2585
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: 9499f537af70efdcf76d72b5a0de7813a35b0b86

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>
arch/x86/kernel/apm_32.c
arch/x86/kernel/process.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
drivers/acpi/processor_idle.c
include/asm-x86/processor.h