diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_idle.c | 12 |
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: |