aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-03-25 10:31:07 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 12:10:56 -0500
commitbd6633476922b7b51227f7f704c2546e763ae5ed (patch)
tree4e9844781419fe600c3e9f3e9dab8207f8dd12dd
parent7682968b7d4d42bb076051b962c3926b4c98539a (diff)
[PATCH] x86_64: Force broadcast timer on AMD systems with C3 too.
Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/acpi/processor_idle.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index eb730a80952c..2be895895943 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -876,14 +876,11 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
876{ 876{
877 unsigned int i; 877 unsigned int i;
878 unsigned int working = 0; 878 unsigned int working = 0;
879 879 int timer_broadcast = 0;
880#ifdef ARCH_APICTIMER_STOPS_ON_C3
881 struct cpuinfo_x86 *c = cpu_data + pr->id;
882 cpumask_t mask = cpumask_of_cpu(pr->id); 880 cpumask_t mask = cpumask_of_cpu(pr->id);
883 881
884 if (c->x86_vendor == X86_VENDOR_INTEL) { 882#ifdef ARCH_APICTIMER_STOPS_ON_C3
885 on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1); 883 on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1);
886 }
887#endif 884#endif
888 885
889 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { 886 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
@@ -896,15 +893,20 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
896 893
897 case ACPI_STATE_C2: 894 case ACPI_STATE_C2:
898 acpi_processor_power_verify_c2(cx); 895 acpi_processor_power_verify_c2(cx);
896#ifdef ARCH_APICTIMER_STOPS_ON_C3
897 /* Some AMD systems fake C3 as C2, but still
898 have timer troubles */
899 if (cx->valid &&
900 boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
901 timer_broadcast++;
902#endif
899 break; 903 break;
900 904
901 case ACPI_STATE_C3: 905 case ACPI_STATE_C3:
902 acpi_processor_power_verify_c3(pr, cx); 906 acpi_processor_power_verify_c3(pr, cx);
903#ifdef ARCH_APICTIMER_STOPS_ON_C3 907#ifdef ARCH_APICTIMER_STOPS_ON_C3
904 if (cx->valid && c->x86_vendor == X86_VENDOR_INTEL) { 908 if (cx->valid)
905 on_each_cpu(switch_APIC_timer_to_ipi, 909 timer_broadcast++;
906 &mask, 1, 1);
907 }
908#endif 910#endif
909 break; 911 break;
910 } 912 }
@@ -913,6 +915,9 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
913 working++; 915 working++;
914 } 916 }
915 917
918 if (timer_broadcast)
919 on_each_cpu(switch_APIC_timer_to_ipi, &mask, 1, 1);
920
916 return (working); 921 return (working);
917} 922}
918 923