aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorVenki Pallipadi <venkatesh.pallipadi@intel.com>2008-03-13 20:18:19 -0400
committerLen Brown <len.brown@intel.com>2008-03-14 00:05:48 -0400
commit71e93d15612c61c2e26a169567becf088e71b8ff (patch)
treec3667895e9f17f412a720a0c9c74c05b123e18f6 /drivers/acpi
parentdba92d3bc49c036056a48661d2d8fefe4c78375a (diff)
ACPI: lockdep warning on boot, 2.6.25-rc5
This avoids the harmless WARNING by lockdep in acpi_processor_idle(). The reason for WARNING is because at the depth of idle handling code, some of the idle handlers disable interrupts, some times, while returning from the idle handler. After return, acpi_processor_idle and few other routines in the file did an unconditional local_irq_enable(). With LOCKDEP, enabling irq when it is already enabled generates the below WARNING. > > [ 0.593038] ------------[ cut here ]------------ > > [ 0.593267] WARNING: at kernel/lockdep.c:2035 trace_hardirqs_on+0xa0/0x115() > > [ 0.593596] Modules linked in: > > [ 0.593756] Pid: 0, comm: swapper Not tainted 2.6.25-rc5 #8 > > [ 0.594017] > > [ 0.594017] Call Trace: > > [ 0.594216] [<ffffffff80231663>] warn_on_slowpath+0x58/0x6b > > [ 0.594495] [<ffffffff80495966>] ? _spin_unlock_irqrestore+0x38/0x47 > > [ 0.594809] [<ffffffff80329a86>] ? acpi_os_release_lock+0x9/0xb > > [ 0.595103] [<ffffffff80337840>] ? acpi_set_register+0x161/0x173 > > [ 0.595401] [<ffffffff8034c8d4>] ? acpi_processor_idle+0x1de/0x546 > > [ 0.595706] [<ffffffff8020a23b>] ? default_idle+0x0/0x73 > > [ 0.595970] [<ffffffff8024fc0e>] trace_hardirqs_on+0xa0/0x115 > > [ 0.596049] [<ffffffff8034c6f6>] ? acpi_processor_idle+0x0/0x546 > > [ 0.596346] [<ffffffff8034c8d4>] acpi_processor_idle+0x1de/0x546 > > [ 0.596642] [<ffffffff8020a23b>] ? default_idle+0x0/0x73 > > [ 0.596912] [<ffffffff8034c6f6>] ? acpi_processor_idle+0x0/0x546 > > [ 0.597209] [<ffffffff8020a23b>] ? default_idle+0x0/0x73 > > [ 0.597472] [<ffffffff8020a355>] cpu_idle+0xa7/0xd1 > > [ 0.597717] [<ffffffff80485fa1>] rest_init+0x55/0x57 > > [ 0.597957] [<ffffffff8062fb49>] start_kernel+0x29d/0x2a8 > > [ 0.598215] [<ffffffff8062f1da>] _sinittext+0x1da/0x1e1 > > [ 0.598464] > > [ 0.598546] ---[ end trace 778e504de7e3b1e3 ]--- Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_idle.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 6f3b217699e9..e8e2d8869236 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -216,8 +216,10 @@ static void acpi_safe_halt(void)
216 * test NEED_RESCHED: 216 * test NEED_RESCHED:
217 */ 217 */
218 smp_mb(); 218 smp_mb();
219 if (!need_resched()) 219 if (!need_resched()) {
220 safe_halt(); 220 safe_halt();
221 local_irq_disable();
222 }
221 current_thread_info()->status |= TS_POLLING; 223 current_thread_info()->status |= TS_POLLING;
222} 224}
223 225
@@ -421,7 +423,9 @@ static void acpi_processor_idle(void)
421 else 423 else
422 acpi_safe_halt(); 424 acpi_safe_halt();
423 425
424 local_irq_enable(); 426 if (irqs_disabled())
427 local_irq_enable();
428
425 return; 429 return;
426 } 430 }
427 431
@@ -530,7 +534,9 @@ static void acpi_processor_idle(void)
530 * skew otherwise. 534 * skew otherwise.
531 */ 535 */
532 sleep_ticks = 0xFFFFFFFF; 536 sleep_ticks = 0xFFFFFFFF;
533 local_irq_enable(); 537 if (irqs_disabled())
538 local_irq_enable();
539
534 break; 540 break;
535 541
536 case ACPI_STATE_C2: 542 case ACPI_STATE_C2: