[PATCH 0/1] 2.6.17-rc5 patch for HPET operation on NVIDIA platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




This patch fixes a kernel panic during boot that occurs on NVIDIA
platforms that have
HPET enabled. When HPET is enabled, the standard timer IRQ is routed to
IOAPIC pin 2
and is advertised as such in the ACPI APIC table - but an earlier
workaround in the
kernel was ignoring this override. The fix is to honor timer IRQ
overrides from ACPI
when HPET is detected on an NVIDIA platform.

64-bit kernel patch:

Signed-off-by: Andy Currid <[email protected]>

diff -u linux-2.6.17-rc5/arch/x86_64/kernel/io_apic.c
linux-2.6.17-rc5-patch/arch/x86_64/kernel/io_apic.c 
--- linux-2.6.17-rc5/arch/x86_64/kernel/io_apic.c	2006-05-27
15:38:26.000000000 -0700
+++ linux-2.6.17-rc5-patch/arch/x86_64/kernel/io_apic.c	2006-05-27
16:33:55.000000000 -0700
@@ -271,6 +271,18 @@
 #include <linux/pci_ids.h>
 #include <linux/pci.h>
 
+
+#ifdef CONFIG_ACPI
+
+static int nvidia_hpet_detected __initdata;
+
+static int __init nvidia_hpet_check(unsigned long phys, unsigned long
size)
+{
+	nvidia_hpet_detected = 1;
+	return 0;
+}
+#endif
+
 /* Temporary Hack. Nvidia and VIA boards currently only work with
IO-APIC
    off. Check for an Nvidia or VIA PCI bridge and turn it off.
    Use pci direct infrastructure because this runs before the PCI
subsystem. 
@@ -317,11 +329,15 @@
 					return;
 				case PCI_VENDOR_ID_NVIDIA:
 #ifdef CONFIG_ACPI
-					/* All timer overrides on Nvidia
-				           seem to be wrong. Skip them.
*/
-					acpi_skip_timer_override = 1;
-					printk(KERN_INFO 
-	     "Nvidia board detected. Ignoring ACPI timer override.\n");
+					/* All timer overrides on Nvidia
are wrong unless HPET
+				           is enabled. */
+					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");
+					}
 #endif
 					/* RED-PEN skip them on mptables
too? */
 					return;

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux