idle fix
Subsystems (3)
Linus, please pull the following fix:
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-idle-fix.git for-linus
i'd normally wait for Len/Venki to ack the ACPI bits but this seems more urgent as people are seeing lockups via the ACPI-idle route, as per:
http://lkml.org/lkml/2008/4/26/235
Thanks,
Ingo
------------------>
Peter Zijlstra (1):
fix idle (arch, acpi and apm) and lockdep
arch/x86/kernel/apm_32.c | 3 + arch/x86/kernel/process.c | 117 +++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/process_32.c | 118 +-------------------------------------- arch/x86/kernel/process_64.c | 123 +---------------------------------------- drivers/acpi/processor_idle.c | 19 +++--- include/asm-x86/processor.h | 1 + 6 files changed, 137 insertions(+), 244 deletions(-)
arch/x86/kernel/apm_32.c +3 -0
@@ -904,6 +904,7 @@ recalc:original_pm_idle (); elsedefault_idle (); +local_irq_disable (); jiffies_since_last_check = jiffies - last_jiffies;if (jiffies_since_last_check > idle_period) goto recalc;
@@ -911,6 +912,8 @@ recalc:if (apm_idle_done)apm_do_busy (); + +local_irq_enable (); }/**
arch/x86/kernel/process.c +117 -0
126 lines not on this page · raw message
arch/x86/kernel/process_32.c +4 -114
143 lines not on this page · raw message
arch/x86/kernel/process_64.c +3 -120
139 lines not on this page · raw message
drivers/acpi/processor_idle.c +9 -10
@@ -418,13 +418,12 @@ static void acpi_processor_idle(void) cx = pr->power.state;if (!cx || acpi_idle_suspend) { -if (pm_idle_save) -pm_idle_save (); -else +if (pm_idle_save) { +pm_idle_save ();/* enables IRQs */ + }else {acpi_safe_halt (); - -if (irqs_disabled ())local_irq_enable (); + }return ; }
@@ -520,10 +519,12 @@ static void acpi_processor_idle(void)* Use the appropriate idle routine, the one that would * be used without acpi C-states. */ -if (pm_idle_save) -pm_idle_save (); -else +if (pm_idle_save) { +pm_idle_save ();/* enables IRQs */ + }else {acpi_safe_halt (); +local_irq_enable (); + }/* * TBD: Can't get time duration while in C1, as resumes
@@ -534,8 +535,6 @@ static void acpi_processor_idle(void)* skew otherwise. */ sleep_ticks =0xFFFFFFFF ; -if (irqs_disabled ()) -local_irq_enable ();break ;
include/asm-x86/processor.h +1 -0
@@ -722,6 +722,7 @@ static inline void __mwait(unsigned long eax, unsigned long ecx)static inline void __sti_mwait (unsigned long eax,unsigned long ecx) { +trace_hardirqs_on ();/* "mwait %eax, %ecx;" */ asmvolatile ("sti; .byte 0x0f, 0x01, 0xc9;" ::"a" (eax),"c" (ecx));