X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Facpi%2Fprocessor_idle.c;h=80fa43471f484dd68c190d8726086a2e03cc00b3;hb=30d41bfbfb40bc6615e62eaa17fead79e3083c32;hp=be2dae52f6fa47a6b74dbca63c47a553236cfd27;hpb=27ee6e0592c7d624836835dd8d2f0f74e9d289f6;p=powerpc.git diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index be2dae52f6..80fa43471f 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -94,7 +94,9 @@ static int set_max_cstate(struct dmi_system_id *id) return 0; } -static struct dmi_system_id __initdata processor_power_dmi_table[] = { +/* Actually this shouldn't be __cpuinitdata, would be better to fix the + callers to only run once -AK */ +static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = { { set_max_cstate, "IBM ThinkPad R40e", { DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1}, @@ -876,12 +878,9 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) unsigned int working = 0; #ifdef ARCH_APICTIMER_STOPS_ON_C3 - struct cpuinfo_x86 *c = cpu_data + pr->id; + int timer_broadcast = 0; cpumask_t mask = cpumask_of_cpu(pr->id); - - if (c->x86_vendor == X86_VENDOR_INTEL) { - on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1); - } + on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1); #endif for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { @@ -894,15 +893,20 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) case ACPI_STATE_C2: 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; case ACPI_STATE_C3: acpi_processor_power_verify_c3(pr, cx); #ifdef ARCH_APICTIMER_STOPS_ON_C3 - if (c->x86_vendor == X86_VENDOR_INTEL) { - on_each_cpu(switch_APIC_timer_to_ipi, - &mask, 1, 1); - } + if (cx->valid) + timer_broadcast++; #endif break; } @@ -911,6 +915,11 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) working++; } +#ifdef ARCH_APICTIMER_STOPS_ON_C3 + if (timer_broadcast) + on_each_cpu(switch_APIC_timer_to_ipi, &mask, 1, 1); +#endif + return (working); }