linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andy Currid" <ACurrid@nvidia.com>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH 0/1] 2.6.17-rc5 patch for HPET operation on NVIDIA platforms
Date: Thu, 1 Jun 2006 07:23:36 -0700	[thread overview]
Message-ID: <8E5ACAE05E6B9E44A2903C693A5D4E8A15D0E4D6@hqemmail02.nvidia.com> (raw)



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 <acurrid@nvidia.com>

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.
-----------------------------------------------------------------------------------

                 reply	other threads:[~2006-06-01 14:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8E5ACAE05E6B9E44A2903C693A5D4E8A15D0E4D6@hqemmail02.nvidia.com \
    --to=acurrid@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).