Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312730
b: refs/heads/master
c: d52fdf1
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 18, 2012
1 parent 24e606c commit 792b4a4
Show file tree
Hide file tree
Showing 13 changed files with 390 additions and 160 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11388c87d2abca1f01975ced28ce9eacea239104
refs/heads/master: d52fdf13377c25e7a5620c6bec406bbf6a46d443
7 changes: 0 additions & 7 deletions trunk/drivers/acpi/processor_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,18 +427,11 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
* Initialize missing things
*/
if (pr->flags.need_hotplug_init) {
struct cpuidle_driver *idle_driver =
cpuidle_get_driver();

printk(KERN_INFO "Will online and init hotplugged "
"CPU: %d\n", pr->id);
WARN(acpi_processor_start(pr), "Failed to start CPU:"
" %d\n", pr->id);
pr->flags.need_hotplug_init = 0;
if (idle_driver && !strcmp(idle_driver->name,
"intel_idle")) {
intel_idle_cpu_init(pr->id);
}
/* Normal CPU soft online event */
} else {
acpi_processor_ppc_has_changed(pr, 0);
Expand Down
39 changes: 1 addition & 38 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,

#endif

/*
* Suspend / resume control
*/
static int acpi_idle_suspend;
static u32 saved_bm_rld;

static void acpi_idle_bm_rld_save(void)
Expand All @@ -243,21 +239,13 @@ static void acpi_idle_bm_rld_restore(void)

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_suspend = 1;
return 0;
}

int acpi_processor_resume(struct acpi_device * device)
{
if (acpi_idle_suspend == 0)
return 0;

acpi_idle_bm_rld_restore();
acpi_idle_suspend = 0;
return 0;
}

Expand Down Expand Up @@ -595,7 +583,6 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
*/
cx->valid = 1;

cx->latency_ticks = cx->latency;
/*
* On older chipsets, BM_RLD needs to be set
* in order for Bus Master activity to wake the
Expand Down Expand Up @@ -628,7 +615,6 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
if (!cx->address)
break;
cx->valid = 1;
cx->latency_ticks = cx->latency; /* Normalize latency */
break;

case ACPI_STATE_C3:
Expand Down Expand Up @@ -763,11 +749,6 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,

local_irq_disable();

if (acpi_idle_suspend) {
local_irq_enable();
cpu_relax();
return -EBUSY;
}

lapic_timer_state_broadcast(pr, cx, 1);
kt1 = ktime_get_real();
Expand All @@ -779,7 +760,6 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
dev->last_residency = (int)idle_time;

local_irq_enable();
cx->usage++;
lapic_timer_state_broadcast(pr, cx, 0);

return index;
Expand Down Expand Up @@ -838,11 +818,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,

local_irq_disable();

if (acpi_idle_suspend) {
local_irq_enable();
cpu_relax();
return -EBUSY;
}

if (cx->entry_method != ACPI_CSTATE_FFH) {
current_thread_info()->status &= ~TS_POLLING;
Expand Down Expand Up @@ -887,10 +862,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
if (cx->entry_method != ACPI_CSTATE_FFH)
current_thread_info()->status |= TS_POLLING;

cx->usage++;

lapic_timer_state_broadcast(pr, cx, 0);
cx->time += idle_time;
return index;
}

Expand Down Expand Up @@ -928,20 +900,14 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
drv, drv->safe_state_index);
} else {
local_irq_disable();
if (!acpi_idle_suspend)
acpi_safe_halt();
acpi_safe_halt();
local_irq_enable();
return -EBUSY;
}
}

local_irq_disable();

if (acpi_idle_suspend) {
local_irq_enable();
cpu_relax();
return -EBUSY;
}

if (cx->entry_method != ACPI_CSTATE_FFH) {
current_thread_info()->status &= ~TS_POLLING;
Expand Down Expand Up @@ -1014,10 +980,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
if (cx->entry_method != ACPI_CSTATE_FFH)
current_thread_info()->status |= TS_POLLING;

cx->usage++;

lapic_timer_state_broadcast(pr, cx, 0);
cx->time += idle_time;
return index;
}

Expand Down
Loading

0 comments on commit 792b4a4

Please sign in to comment.