Skip to content

Commit

Permalink
[PATCH] x86: Add acpi_user_timer_override option for Asus boards
Browse files Browse the repository at this point in the history
Timer overrides are normally disabled on Nvidia board because
they are commonly wrong, except on new ones with HPET support.
Unfortunately there are quite some Asus boards around that
don't have HPET, but need a timer override.

We don't know yet how to handle this transparently,
but at least add a command line option to force the timer override
and let them boot.

Cc: len.brown@intel.com

Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Nov 14, 2006
1 parent 15803a4 commit fa18f47
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ and is between 256 and 4096 characters. It is defined in the file
acpi_skip_timer_override [HW,ACPI]
Recognize and ignore IRQ0/pin2 Interrupt Override.
For broken nForce2 BIOS resulting in XT-PIC timer.
acpi_use_timer_override [HW,ACPI}
Use timer override. For some broken Nvidia NF5 boards
that require a timer override, but don't have
HPET

acpi_dbg_layer= [HW,ACPI]
Format: <int>
Expand Down
8 changes: 8 additions & 0 deletions arch/i386/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ EXPORT_SYMBOL(acpi_strict);
acpi_interrupt_flags acpi_sci_flags __initdata;
int acpi_sci_override_gsi __initdata;
int acpi_skip_timer_override __initdata;
int acpi_use_timer_override __initdata;

#ifdef CONFIG_X86_LOCAL_APIC
static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
Expand Down Expand Up @@ -1300,6 +1301,13 @@ static int __init parse_acpi_skip_timer_override(char *arg)
return 0;
}
early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override);

static int __init parse_acpi_use_timer_override(char *arg)
{
acpi_use_timer_override = 1;
return 0;
}
early_param("acpi_use_timer_override", parse_acpi_use_timer_override);
#endif /* CONFIG_X86_IO_APIC */

static int __init setup_acpi_sci(char *s)
Expand Down
8 changes: 7 additions & 1 deletion arch/i386/kernel/acpi/earlyquirk.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ static int __init check_bridge(int vendor, int device)
#ifdef CONFIG_ACPI
/* According to Nvidia all timer overrides are bogus unless HPET
is enabled. */
if (vendor == PCI_VENDOR_ID_NVIDIA) {
if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
nvidia_hpet_detected = 0;
acpi_table_parse(ACPI_HPET, nvidia_hpet_check);
if (nvidia_hpet_detected == 0) {
acpi_skip_timer_override = 1;
printk(KERN_INFO "Nvidia board "
"detected. Ignoring ACPI "
"timer override.\n");
printk(KERN_INFO "If you got timer trouble "
"try acpi_use_timer_override\n");

}
}
#endif
Expand Down
8 changes: 8 additions & 0 deletions arch/x86_64/kernel/early-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,22 @@ static void nvidia_bugs(void)
/*
* All timer overrides on Nvidia are
* wrong unless HPET is enabled.
* Unfortunately that's not true on many Asus boards.
* We don't know yet how to detect this automatically, but
* at least allow a command line override.
*/
if (acpi_use_timer_override)
return;

nvidia_hpet_detected = 0;
acpi_table_parse(ACPI_HPET, nvidia_hpet_check);
if (nvidia_hpet_detected == 0) {
acpi_skip_timer_override = 1;
printk(KERN_INFO "Nvidia board "
"detected. Ignoring ACPI "
"timer override.\n");
printk(KERN_INFO "If you got timer trouble "
"try acpi_use_timer_override\n");
}
#endif
/* RED-PEN skip them on mptables too? */
Expand Down
1 change: 1 addition & 0 deletions include/asm-i386/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);

#ifdef CONFIG_X86_IO_APIC
extern int acpi_skip_timer_override;
extern int acpi_use_timer_override;
#endif

static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
Expand Down
1 change: 1 addition & 0 deletions include/asm-x86_64/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ extern u8 x86_acpiid_to_apicid[];
#define ARCH_HAS_POWER_INIT 1

extern int acpi_skip_timer_override;
extern int acpi_use_timer_override;

#endif /*__KERNEL__*/

Expand Down

0 comments on commit fa18f47

Please sign in to comment.