Commit bd663347 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Force broadcast timer on AMD systems with C3 too.

Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7682968b
...@@ -876,14 +876,11 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) ...@@ -876,14 +876,11 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
{ {
unsigned int i; unsigned int i;
unsigned int working = 0; unsigned int working = 0;
int timer_broadcast = 0;
#ifdef ARCH_APICTIMER_STOPS_ON_C3
struct cpuinfo_x86 *c = cpu_data + pr->id;
cpumask_t mask = cpumask_of_cpu(pr->id); cpumask_t mask = cpumask_of_cpu(pr->id);
if (c->x86_vendor == X86_VENDOR_INTEL) { #ifdef ARCH_APICTIMER_STOPS_ON_C3
on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1); on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1);
}
#endif #endif
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
...@@ -896,15 +893,20 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) ...@@ -896,15 +893,20 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
case ACPI_STATE_C2: case ACPI_STATE_C2:
acpi_processor_power_verify_c2(cx); acpi_processor_power_verify_c2(cx);
#ifdef ARCH_APICTIMER_STOPS_ON_C3
/* Some AMD systems fake C3 as C2, but still
have timer troubles */
if (cx->valid &&
boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
timer_broadcast++;
#endif
break; break;
case ACPI_STATE_C3: case ACPI_STATE_C3:
acpi_processor_power_verify_c3(pr, cx); acpi_processor_power_verify_c3(pr, cx);
#ifdef ARCH_APICTIMER_STOPS_ON_C3 #ifdef ARCH_APICTIMER_STOPS_ON_C3
if (cx->valid && c->x86_vendor == X86_VENDOR_INTEL) { if (cx->valid)
on_each_cpu(switch_APIC_timer_to_ipi, timer_broadcast++;
&mask, 1, 1);
}
#endif #endif
break; break;
} }
...@@ -913,6 +915,9 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) ...@@ -913,6 +915,9 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
working++; working++;
} }
if (timer_broadcast)
on_each_cpu(switch_APIC_timer_to_ipi, &mask, 1, 1);
return (working); return (working);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment