diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2005-09-15 12:20:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-11-30 03:23:52 -0500 |
commit | 4c0335526c95d90a1d958e0059f40a5745fc7c5d (patch) | |
tree | 9a4f6f84f9ba1b1a838e71799470b2acab9e2ba7 /drivers/acpi | |
parent | 6d93c64803a5fea84839789aae13290419c62d92 (diff) |
[ACPI] Add support for FADT P_LVL2_UP flag
which tells us if C2 is valid for UP-only, or SMP.
As there is no separate bit for C3, use P_LVL2_UP
bit to cover both C2 and C3.
http://bugzilla.kernel.org/show_bug.cgi?id=5165
Signed-off-by: Venkatesh Pallipadi<venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from 28b86b368af3944eb383078fc5797caf2dc8ce44 commit)
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_idle.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 5b6a9865300e..83fd1b6c10c4 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -280,6 +280,16 @@ static void acpi_processor_idle(void) | |||
280 | 280 | ||
281 | cx->usage++; | 281 | cx->usage++; |
282 | 282 | ||
283 | #ifdef CONFIG_HOTPLUG_CPU | ||
284 | /* | ||
285 | * Check for P_LVL2_UP flag before entering C2 and above on | ||
286 | * an SMP system. We do it here instead of doing it at _CST/P_LVL | ||
287 | * detection phase, to work cleanly with logical CPU hotplug. | ||
288 | */ | ||
289 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && | ||
290 | !pr->flags.has_cst && acpi_fadt.plvl2_up) | ||
291 | cx->type = ACPI_STATE_C1; | ||
292 | #endif | ||
283 | /* | 293 | /* |
284 | * Sleep: | 294 | * Sleep: |
285 | * ------ | 295 | * ------ |
@@ -534,6 +544,15 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
534 | pr->power.states[ACPI_STATE_C0].valid = 1; | 544 | pr->power.states[ACPI_STATE_C0].valid = 1; |
535 | pr->power.states[ACPI_STATE_C1].valid = 1; | 545 | pr->power.states[ACPI_STATE_C1].valid = 1; |
536 | 546 | ||
547 | #ifndef CONFIG_HOTPLUG_CPU | ||
548 | /* | ||
549 | * Check for P_LVL2_UP flag before entering C2 and above on | ||
550 | * an SMP system. | ||
551 | */ | ||
552 | if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) | ||
553 | return_VALUE(-ENODEV); | ||
554 | #endif | ||
555 | |||
537 | /* determine C2 and C3 address from pblk */ | 556 | /* determine C2 and C3 address from pblk */ |
538 | pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4; | 557 | pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4; |
539 | pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; | 558 | pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; |