diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-22 19:43:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-22 19:43:02 -0700 |
commit | 37c70d0d09747a958ec50aeb11ed1bf896da028c (patch) | |
tree | 5f026a3cfc7e4d4b11ca8cf7c787325bfb96e4e0 /drivers/acpi/processor_idle.c | |
parent | 7f52a3afc4c02db75b3953fcbbb980abc86873a2 (diff) | |
parent | cddece4beccaa72dcb57d64a7f1e496b2e61a16b (diff) | |
download | blackbird-op-linux-37c70d0d09747a958ec50aeb11ed1bf896da028c.tar.gz blackbird-op-linux-37c70d0d09747a958ec50aeb11ed1bf896da028c.zip |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: IA64: fix %ll build warnings
ACPI: IA64: fix allnoconfig build
ACPI: Only use IPI on known broken machines (AMD, Dothan/BaniasPentium M)
ACPI: ibm-acpi: allow module to load when acpi notifiers can't be set (v2)
ACPI: parse 2nd MADT by default
ACPICA: revert "acpi_serialize" changes
sony-laptop: MAINTAINERS fix entry, add L: and W:
ACPI: resolve HP nx6125 S3 immediate wakeup regression
ACPI: Add support to parse 2nd MADT
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 60773005b8af..562124ed785e 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -89,6 +89,12 @@ module_param(nocst, uint, 0000); static unsigned int bm_history __read_mostly = (HZ >= 800 ? 0xFFFFFFFF : ((1U << (HZ / 25)) - 1)); module_param(bm_history, uint, 0644); + +static unsigned use_ipi = 2; +module_param(use_ipi, uint, 0644); +MODULE_PARM_DESC(use_ipi, "IPI (vs. LAPIC) irqs for not waking up from C2/C3" + " machines. 0=apic, 1=ipi, 2=auto\n"); + /* -------------------------------------------------------------------------- Power Management -------------------------------------------------------------------------- */ @@ -260,9 +266,8 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate) /* * Some BIOS implementations switch to C3 in the published C2 state. - * This seems to be a common problem on AMD boxen, but other vendors - * are affected too. We pick the most conservative approach: we assume - * that the local APIC stops in both C2 and C3. + * This seems to be a common problem on AMD boxen and Intel Dothan/Banias + * Pentium M machines. */ static void acpi_timer_check_state(int state, struct acpi_processor *pr, struct acpi_processor_cx *cx) @@ -276,8 +281,17 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr, if (pwr->timer_broadcast_on_state < state) return; - if (cx->type >= ACPI_STATE_C2) - pr->power.timer_broadcast_on_state = state; + if (cx->type >= ACPI_STATE_C2) { + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + pr->power.timer_broadcast_on_state = state; + else if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && + boot_cpu_data.x86 == 6) && + (boot_cpu_data.x86_model == 13 || + boot_cpu_data.x86_model == 9)) + { + pr->power.timer_broadcast_on_state = state; + } + } } static void acpi_propagate_timer_broadcast(struct acpi_processor *pr) @@ -292,10 +306,16 @@ static void acpi_propagate_timer_broadcast(struct acpi_processor *pr) #else cpumask_t mask = cpumask_of_cpu(pr->id); - if (pr->power.timer_broadcast_on_state < INT_MAX) + if (use_ipi == 0) on_each_cpu(switch_APIC_timer_to_ipi, &mask, 1, 1); - else + else if (use_ipi == 1) on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1); + else { + if (pr->power.timer_broadcast_on_state < INT_MAX) + on_each_cpu(switch_APIC_timer_to_ipi, &mask, 1, 1); + else + on_each_cpu(switch_ipi_to_APIC_timer, &mask, 1, 1); + } #endif } @@ -1013,13 +1033,13 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) case ACPI_STATE_C2: acpi_processor_power_verify_c2(cx); - if (cx->valid) + if (cx->valid && use_ipi != 0 && use_ipi != 1) acpi_timer_check_state(i, pr, cx); break; case ACPI_STATE_C3: acpi_processor_power_verify_c3(pr, cx); - if (cx->valid) + if (cx->valid && use_ipi != 0 && use_ipi != 1) acpi_timer_check_state(i, pr, cx); break; } |