|
@@ -221,10 +221,6 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-/*
|
|
|
|
- * Suspend / resume control
|
|
|
|
- */
|
|
|
|
-static int acpi_idle_suspend;
|
|
|
|
static u32 saved_bm_rld;
|
|
static u32 saved_bm_rld;
|
|
|
|
|
|
static void acpi_idle_bm_rld_save(void)
|
|
static void acpi_idle_bm_rld_save(void)
|
|
@@ -243,21 +239,13 @@ static void acpi_idle_bm_rld_restore(void)
|
|
|
|
|
|
int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
|
|
int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
|
|
{
|
|
{
|
|
- if (acpi_idle_suspend == 1)
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
acpi_idle_bm_rld_save();
|
|
acpi_idle_bm_rld_save();
|
|
- acpi_idle_suspend = 1;
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
int acpi_processor_resume(struct acpi_device * device)
|
|
int acpi_processor_resume(struct acpi_device * device)
|
|
{
|
|
{
|
|
- if (acpi_idle_suspend == 0)
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
acpi_idle_bm_rld_restore();
|
|
acpi_idle_bm_rld_restore();
|
|
- acpi_idle_suspend = 0;
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -763,11 +751,6 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
|
|
|
|
|
|
local_irq_disable();
|
|
local_irq_disable();
|
|
|
|
|
|
- if (acpi_idle_suspend) {
|
|
|
|
- local_irq_enable();
|
|
|
|
- cpu_relax();
|
|
|
|
- return -EBUSY;
|
|
|
|
- }
|
|
|
|
|
|
|
|
lapic_timer_state_broadcast(pr, cx, 1);
|
|
lapic_timer_state_broadcast(pr, cx, 1);
|
|
kt1 = ktime_get_real();
|
|
kt1 = ktime_get_real();
|
|
@@ -838,11 +821,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
|
|
|
|
|
|
local_irq_disable();
|
|
local_irq_disable();
|
|
|
|
|
|
- if (acpi_idle_suspend) {
|
|
|
|
- local_irq_enable();
|
|
|
|
- cpu_relax();
|
|
|
|
- return -EBUSY;
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (cx->entry_method != ACPI_CSTATE_FFH) {
|
|
if (cx->entry_method != ACPI_CSTATE_FFH) {
|
|
current_thread_info()->status &= ~TS_POLLING;
|
|
current_thread_info()->status &= ~TS_POLLING;
|
|
@@ -928,8 +906,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
|
|
drv, drv->safe_state_index);
|
|
drv, drv->safe_state_index);
|
|
} else {
|
|
} else {
|
|
local_irq_disable();
|
|
local_irq_disable();
|
|
- if (!acpi_idle_suspend)
|
|
|
|
- acpi_safe_halt();
|
|
|
|
|
|
+ acpi_safe_halt();
|
|
local_irq_enable();
|
|
local_irq_enable();
|
|
return -EBUSY;
|
|
return -EBUSY;
|
|
}
|
|
}
|
|
@@ -937,11 +914,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
|
|
|
|
|
|
local_irq_disable();
|
|
local_irq_disable();
|
|
|
|
|
|
- if (acpi_idle_suspend) {
|
|
|
|
- local_irq_enable();
|
|
|
|
- cpu_relax();
|
|
|
|
- return -EBUSY;
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (cx->entry_method != ACPI_CSTATE_FFH) {
|
|
if (cx->entry_method != ACPI_CSTATE_FFH) {
|
|
current_thread_info()->status &= ~TS_POLLING;
|
|
current_thread_info()->status &= ~TS_POLLING;
|