diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2007-06-15 19:37:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-07-18 21:43:21 -0400 |
commit | 18eab8550397f1f3d4b8b2c5257c88dae25d58ed (patch) | |
tree | bc0440ed3e66207fd248163a290b6fcc5c9c2ae6 /drivers | |
parent | 33ce2033433195ccc1fbad00d26ad854b2ab68d0 (diff) |
ACPI: Enable C3 even when PM2_control is zero
On systems that do not have pm2_control_block, we cannot really use
ARB_DISABLE before C3. We used to disable C3 totally on such systems.
To be compatible with Windows, we need to enable C3 on such systems now.
We just skip ARB_DISABLE step before entering the C3-state and assume
hardware is handling things correctly. Also, ACPI spec is not clear
about pm2_control is _needed_ for C3 or not.
We have atleast one system that need this to enable C3.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_idle.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index ee5759bef945..36dc1d26520a 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -488,7 +488,17 @@ static void acpi_processor_idle(void) | |||
488 | 488 | ||
489 | case ACPI_STATE_C3: | 489 | case ACPI_STATE_C3: |
490 | 490 | ||
491 | if (pr->flags.bm_check) { | 491 | /* |
492 | * disable bus master | ||
493 | * bm_check implies we need ARB_DIS | ||
494 | * !bm_check implies we need cache flush | ||
495 | * bm_control implies whether we can do ARB_DIS | ||
496 | * | ||
497 | * That leaves a case where bm_check is set and bm_control is | ||
498 | * not set. In that case we cannot do much, we enter C3 | ||
499 | * without doing anything. | ||
500 | */ | ||
501 | if (pr->flags.bm_check && pr->flags.bm_control) { | ||
492 | if (atomic_inc_return(&c3_cpu_count) == | 502 | if (atomic_inc_return(&c3_cpu_count) == |
493 | num_online_cpus()) { | 503 | num_online_cpus()) { |
494 | /* | 504 | /* |
@@ -497,7 +507,7 @@ static void acpi_processor_idle(void) | |||
497 | */ | 507 | */ |
498 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); | 508 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); |
499 | } | 509 | } |
500 | } else { | 510 | } else if (!pr->flags.bm_check) { |
501 | /* SMP with no shared cache... Invalidate cache */ | 511 | /* SMP with no shared cache... Invalidate cache */ |
502 | ACPI_FLUSH_CPU_CACHE(); | 512 | ACPI_FLUSH_CPU_CACHE(); |
503 | } | 513 | } |
@@ -509,7 +519,7 @@ static void acpi_processor_idle(void) | |||
509 | acpi_cstate_enter(cx); | 519 | acpi_cstate_enter(cx); |
510 | /* Get end time (ticks) */ | 520 | /* Get end time (ticks) */ |
511 | t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); | 521 | t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); |
512 | if (pr->flags.bm_check) { | 522 | if (pr->flags.bm_check && pr->flags.bm_control) { |
513 | /* Enable bus master arbitration */ | 523 | /* Enable bus master arbitration */ |
514 | atomic_dec(&c3_cpu_count); | 524 | atomic_dec(&c3_cpu_count); |
515 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); | 525 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); |
@@ -959,9 +969,9 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, | |||
959 | if (pr->flags.bm_check) { | 969 | if (pr->flags.bm_check) { |
960 | /* bus mastering control is necessary */ | 970 | /* bus mastering control is necessary */ |
961 | if (!pr->flags.bm_control) { | 971 | if (!pr->flags.bm_control) { |
972 | /* In this case we enter C3 without bus mastering */ | ||
962 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 973 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
963 | "C3 support requires bus mastering control\n")); | 974 | "C3 support without bus mastering control\n")); |
964 | return; | ||
965 | } | 975 | } |
966 | } else { | 976 | } else { |
967 | /* | 977 | /* |