diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_idle.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index f7ca8c55956b..e39a40a2ceae 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -216,7 +216,7 @@ int acpi_processor_resume(struct acpi_device * device) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) | 218 | #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) |
219 | static int tsc_halts_in_c(int state) | 219 | static void tsc_check_state(int state) |
220 | { | 220 | { |
221 | switch (boot_cpu_data.x86_vendor) { | 221 | switch (boot_cpu_data.x86_vendor) { |
222 | case X86_VENDOR_AMD: | 222 | case X86_VENDOR_AMD: |
@@ -226,13 +226,17 @@ static int tsc_halts_in_c(int state) | |||
226 | * C/P/S0/S1 states when this bit is set. | 226 | * C/P/S0/S1 states when this bit is set. |
227 | */ | 227 | */ |
228 | if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) | 228 | if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) |
229 | return 0; | 229 | return; |
230 | 230 | ||
231 | /*FALL THROUGH*/ | 231 | /*FALL THROUGH*/ |
232 | default: | 232 | default: |
233 | return state > ACPI_STATE_C1; | 233 | /* TSC could halt in idle, so notify users */ |
234 | if (state > ACPI_STATE_C1) | ||
235 | mark_tsc_unstable("TSC halts in idle"); | ||
234 | } | 236 | } |
235 | } | 237 | } |
238 | #else | ||
239 | static void tsc_check_state(int state) { return; } | ||
236 | #endif | 240 | #endif |
237 | 241 | ||
238 | static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | 242 | static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) |
@@ -581,11 +585,6 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) | |||
581 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { | 585 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { |
582 | struct acpi_processor_cx *cx = &pr->power.states[i]; | 586 | struct acpi_processor_cx *cx = &pr->power.states[i]; |
583 | 587 | ||
584 | #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) | ||
585 | /* TSC could halt in idle, so notify users */ | ||
586 | if (tsc_halts_in_c(cx->type)) | ||
587 | mark_tsc_unstable("TSC halts in idle");; | ||
588 | #endif | ||
589 | switch (cx->type) { | 588 | switch (cx->type) { |
590 | case ACPI_STATE_C1: | 589 | case ACPI_STATE_C1: |
591 | cx->valid = 1; | 590 | cx->valid = 1; |
@@ -603,6 +602,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) | |||
603 | acpi_timer_check_state(i, pr, cx); | 602 | acpi_timer_check_state(i, pr, cx); |
604 | break; | 603 | break; |
605 | } | 604 | } |
605 | if (cx->valid) | ||
606 | tsc_check_state(cx->type); | ||
606 | 607 | ||
607 | if (cx->valid) | 608 | if (cx->valid) |
608 | working++; | 609 | working++; |