All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Allen <the3dfxdude@hotmail.com>
To: Ross Dickson <ross@datscreative.com.au>
Cc: linux-kernel@vger.kernel.org, AMartin@nvidia.com
Subject: Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
Date: Tue, 9 Dec 2003 20:39:06 -0700	[thread overview]
Message-ID: <20031210033906.GA176@tesore.local> (raw)
In-Reply-To: <200312072312.01013.ross@datscreative.com.au>

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

Hi Ross,

I have rediffed your two patches for vanilla 2.6.0-test11.  Briefly, I tried the apic patch first, and found that there are no lockups so far; well it passed my grep tests and even a kernel compile =).  Then I tried your io_apic patch + apic patch.  With nmi_watchdog=1 "NMI:" in /proc/interrupts increments alot compared to nmi_watchdog=2 before (as much as the timer).  So I believe your two patches are more correct than the other two.  Especially the fact I can run with CPU Disconnect and not lock up just like windows ... for people that have windows (I dont have windows =) plus a probably working nmi_watchdog.

And for comparison, my setup:
Shuttle AN35N Ultra v 1.1  (Nforce2 400 ultra), bios updated
Athlon Barton 2600+ (1.9 Ghz)
256 MB PC3200, single stick.

The patches are included in this mail.  I suppose the next thing to do is get out of nvidia the corresponding information.  And then clean up the patch for inclusion.

Jesse



[-- Attachment #2: nforce2-apic-delay-2.6t11.patch --]
[-- Type: text/plain, Size: 611 bytes --]

--- linux/arch/i386/kernel/apic.c	2003-10-25 11:44:59.000000000 -0700
+++ linux-jla/arch/i386/kernel/apic.c	2003-12-09 19:07:19.000000000 -0700
@@ -1089,6 +1089,16 @@
 	 */
 	irq_stat[cpu].apic_timer_irqs++;
 
+#ifdef CONFIG_MK7 && CONFIG_BLK_DEV_AMD74XX
+
+	/*
+	 * on 2200XP & nforce2 chipset we need at least 500ns delay here
+	 * to stop lockups with udma100 drive. try to scale delay time
+	 * with cpu speed. Ross Dickson.
+	 */
+	ndelay((cpu_khz >> 12)+200 ); /* don't ack too soon or hard lockup */
+#endif
+
 	/*
 	 * NOTE! We'd better ACK the irq immediately,
 	 * because timer handling can be slow.

[-- Attachment #3: nforce2-ioapic-timer-2.6t11.patch --]
[-- Type: text/plain, Size: 1564 bytes --]

--- linux/arch/i386/kernel/io_apic.c	2003-10-25 11:43:20.000000000 -0700
+++ linux-jla/arch/i386/kernel/io_apic.c	2003-12-09 19:56:07.000000000 -0700
@@ -2128,6 +2128,41 @@
 		printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n");
 	}
 
+#ifdef CONFIG_ACPI_BOOT && CONFIG_X86_UP_IOAPIC
+	/* for nforce2 try vector 0 on pin0
+	 * Note the io_apic_set_pci_routing call disables the 8259 irq 0
+	 * so we must be connected directly to the 8254 timer if this works
+	 * Note2: this violates the above comment re Subtle but works!
+	 */
+	printk(KERN_INFO "..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...\n");
+	if ( pin1 != -1 && nr_ioapics ) {
+		int saved_timer_ack = timer_ack;
+		/* next call also disables 8259 irq0 */
+		int result = io_apic_set_pci_routing ( 0, 0, 0, 0, 0);
+		/*
+		 * Ok, does IRQ0 through the IOAPIC work?
+		 */
+		unmask_IO_APIC_irq(0);
+		timer_ack = 0 ;
+		if (timer_irq_works()) {
+			if (nmi_watchdog == NMI_IO_APIC) {
+				disable_8259A_irq(0);
+				setup_nmi();
+				enable_8259A_irq(0);
+				check_nmi_watchdog();
+			}
+			printk(KERN_INFO "..TIMER: works OK on apic pin0 irq0\n" );
+			return;
+		}
+		/* failed */
+		timer_ack = saved_timer_ack;
+		clear_IO_APIC_pin(0, 0);
+		result = io_apic_set_pci_routing ( 0, pin1, 0, 0, 0);
+		printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC Pin 0\n");
+	}
+#endif
+/* end new stuff for nforce2 */
+
 	printk(KERN_INFO "...trying to set up timer (IRQ0) through the 8259A ... ");
 	if (pin2 != -1) {
 		printk("\n..... (found pin %d) ...", pin2);

  parent reply	other threads:[~2003-12-10  2:57 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-07 13:12 Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered Ross Dickson
2003-12-09 15:20 ` Maciej W. Rozycki
2003-12-10  5:43   ` Ross Dickson
2003-12-10 16:06     ` Maciej W. Rozycki
2003-12-11  6:55       ` Ross Dickson
2003-12-11 11:47         ` Ian Kumlien
2003-12-11  9:12           ` Ross Dickson
2003-12-11 17:52             ` Ian Kumlien
2003-12-11 18:21               ` Jesse Allen
2003-12-12  9:27                 ` Bob
2003-12-12 16:59                   ` Working nforce2, was " Jesse Allen
2003-12-12 17:18                     ` Jesse Allen
2003-12-12 18:18                     ` Josh McKinney
2003-12-12 19:29                       ` Jesse Allen
2003-12-12 21:42                       ` Craig Bradney
2003-12-13  4:18                       ` Bob
2003-12-13  6:34                     ` Bob
2003-12-11 14:58           ` Jesse Allen
2003-12-11 15:20             ` Craig Bradney
2003-12-11 16:05               ` Jesse Allen
2003-12-11 15:15         ` Maciej W. Rozycki
2003-12-11 16:23           ` Josh McKinney
2003-12-11 17:04             ` Maciej W. Rozycki
2003-12-11 17:25               ` Jesse Allen
2003-12-10  3:39 ` Jesse Allen [this message]
2003-12-10  9:22   ` Ross Dickson
2003-12-10 10:00   ` Mikael Pettersson
2003-12-10  8:40     ` Ross Dickson
2003-12-11 14:32     ` Jesse Allen
  -- strict thread matches above, loose matches on Subject: below --
2003-12-07 19:58 Ian Kumlien
2003-12-07 20:59 ` Jesse Allen
2003-12-07 20:56   ` Ian Kumlien
2003-12-08  2:07 ` Ross Dickson
2003-12-08  2:23   ` Ian Kumlien
2003-12-11  2:50 Ross Dickson
     [not found] <106Zu-1sD-3@gated-at.bofh.it>
     [not found] ` <1198P-3v0-1@gated-at.bofh.it>
     [not found]   ` <11gah-33u-1@gated-at.bofh.it>
     [not found]     ` <11wIo-4T4-7@gated-at.bofh.it>
     [not found]       ` <11xuB-6k3-11@gated-at.bofh.it>
     [not found]         ` <11AC6-3Sf-3@gated-at.bofh.it>
2003-12-11 17:11           ` Lenar Lõhmus
2003-12-13 18:07 Ross Dickson
2003-12-13 20:22 ` Josh McKinney
2003-12-13 21:38 ` Ian Kumlien
2003-12-14  4:50   ` Josh McKinney
2003-12-13 22:28 ` Ian Kumlien
2003-12-13 23:16   ` Ross Dickson
2003-12-13 23:21     ` Ian Kumlien
2003-12-13 23:49       ` Ross Dickson
2003-12-14  4:27         ` Jamie Lokier
2003-12-14 11:24           ` Ross Dickson
2003-12-14 13:11             ` Ross Dickson
2003-12-14 13:44               ` Ian Kumlien
2003-12-14 17:26             ` Jamie Lokier
2003-12-13 23:31     ` Ian Kumlien
2003-12-15 11:41 ` Bob
2003-12-15 10:57 ross.alexander
2003-12-15 12:49 ` Maciej W. Rozycki
2003-12-15 13:54 Ross Dickson
2003-12-16  1:40 ` Josh McKinney
     [not found] <BF1FE1855350A0479097B3A0D2A80EE0023ED17F@hdsmsx402.hd.intel.com>
2004-02-07 11:46 ` Len Brown
2004-02-07 12:41   ` Maciej W. Rozycki
2004-02-07 15:13     ` Len Brown
2004-02-07 16:24       ` Maciej W. Rozycki

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=20031210033906.GA176@tesore.local \
    --to=the3dfxdude@hotmail.com \
    --cc=AMartin@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ross@datscreative.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.