mirror of
https://github.com/adulau/aha.git
synced 2025-01-04 07:03:38 +00:00
[PATCH] x86_64: Don't enable ATI apicmaintimer workaround when the machine has C2 or C3
Many laptops have problems with ticking the local APIC timer in C2/C3. The code added earlier to use it by default on ATI didn't really work for them. Don't enable it when the system supports C2/C3. This doesn't fix the problem fully, but at least it's not worse than before. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
2391c4b594
commit
ab68805955
1 changed files with 16 additions and 0 deletions
|
@ -30,6 +30,9 @@
|
||||||
#include <linux/mc146818rtc.h>
|
#include <linux/mc146818rtc.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/sysdev.h>
|
#include <linux/sysdev.h>
|
||||||
|
#ifdef CONFIG_ACPI
|
||||||
|
#include <acpi/acpi_bus.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
|
@ -260,6 +263,8 @@ __setup("apic", enable_ioapic_setup);
|
||||||
|
|
||||||
And another hack to disable the IOMMU on VIA chipsets.
|
And another hack to disable the IOMMU on VIA chipsets.
|
||||||
|
|
||||||
|
... and others. Really should move this somewhere else.
|
||||||
|
|
||||||
Kludge-O-Rama. */
|
Kludge-O-Rama. */
|
||||||
void __init check_ioapic(void)
|
void __init check_ioapic(void)
|
||||||
{
|
{
|
||||||
|
@ -307,6 +312,17 @@ void __init check_ioapic(void)
|
||||||
case PCI_VENDOR_ID_ATI:
|
case PCI_VENDOR_ID_ATI:
|
||||||
if (apic_runs_main_timer != 0)
|
if (apic_runs_main_timer != 0)
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_ACPI
|
||||||
|
/* Don't do this for laptops right
|
||||||
|
right now because their timer
|
||||||
|
doesn't necessarily tick in C2/3 */
|
||||||
|
if (acpi_fadt.revision >= 3 &&
|
||||||
|
(acpi_fadt.plvl2_lat + acpi_fadt.plvl3_lat) < 1100) {
|
||||||
|
printk(KERN_INFO
|
||||||
|
"ATI board detected, but seems to be a laptop. Timer might be shakey, sorry\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
"ATI board detected. Using APIC/PM timer.\n");
|
"ATI board detected. Using APIC/PM timer.\n");
|
||||||
apic_runs_main_timer = 1;
|
apic_runs_main_timer = 1;
|
||||||
|
|
Loading…
Reference in a new issue