[PATCH] x86: Don't use nested idle loops
authorAndi Kleen <ak@suse.de>
Thu, 7 Dec 2006 01:14:03 +0000 (02:14 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 7 Dec 2006 01:14:03 +0000 (02:14 +0100)
commit72690a21188586022a9e65cb6f1cc8845167555a
tree6ddd4a04307867128100dbd1906eec5a89f88662
parent63cb683c6ed56a420ba60df6a5b206a44e3f85fe
[PATCH] x86: Don't use nested idle loops

Currently the idle loop has two nested loops -- one high level
in cpu_idle and in some low level idle functions another one.

Looping in the low level idle functions breaks the idle notifiers
because interrupts waking up sleep states need to execute
exit_idle() which is only in cpu_idle().

So don't do that, only loop in cpu_idle(). This only removes
code.

In some cases e.g. poll_idle the idle loop is a little longer
now because cpu_idle checks more things. I hope that isn't a problem
ACPI idle doesn't change behaviour because it never looped anyways.

Cc: len.brown@intel.com
Cc: eranian@hpl.hp.com
Signed-off-by: Andi Kleen <ak@suse.de>
arch/i386/kernel/process.c
arch/x86_64/kernel/process.c