linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: linux-kernel@vger.kernel.org
Cc: mingo@redhat.com
Subject: [PATCH] VIA82C694X based SMP board...
Date: Thu, 14 Dec 2000 00:01:35 +0100	[thread overview]
Message-ID: <20001214000135.A1181@vana.vc.cvut.cz> (raw)

Hi,
  after couple of hours of hacking I finally got my VIA82C694X based
SMP board (Gigabyte GA-6VXD7) to work. I had to add 'udelay(300);'
after sending startup ipi, before we print something to screen.

  Without this udelay it died at the beginning of second printk
(that is, Startup point 1. was printed, there was one empty line at
the end of screen, but Waiting for send to finish was not visible.
And cursor was sometime at the beginning of last line, sometime 
at the end of last line, and sometime invisible :-( ) in couple 
of spectacular ways - almost always hard lock, but four times it 
except hardlocking also powered down both CPU fans and did not react 
even to hard reset (well, it reacted, but BIOS was not able to 
initialize machine).

  I have no idea whether memory r-m-w cycle killed it, or whether
PCI outb cycle (vgacon cursor move) killed it, or what-where-why...
But it must be something in our secondary CPU kernel initialization,
as if I add some loop into trampoline.S, I must increase delay.

  If somebody has access to VIA specs (I asked them, but no answer
yet) and can confirm this in their errata, or if someone sees something
like that in Intel PIII errata (Pentium III Coppermine, BIOS says
CPU ID: 0683, Patch ID: 0010)...

  Anyway, without either of two patches below my machine does not
boot. Is there any reason why we cannot add 'udelay(300);' after
sending startup IPI, as first patch does? Both patches are for
2.4.0-test12. I did not tried 2.2.18 yet (should I?).

  And another question, is there anybody successfully using
Gigabyte 6VXD7 board with two CPUs under Linux 2.4.0-test12 (Netware 
worked without any patch, just FYI) ?
					Thanks,
						Petr Vandrovec
						vandrove@vc.cvut.cz





Variant #1:

diff -urdN linux/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
--- linux/arch/i386/kernel/smpboot.c	Mon Dec  4 01:48:19 2000
+++ linux/arch/i386/kernel/smpboot.c	Wed Dec 13 22:30:47 2000
@@ -694,9 +694,22 @@
 		apic_write_around(APIC_ICR, APIC_DM_STARTUP
 					| (start_eip >> 12));
 
+		/*
+		 * Petr Vandrovec:
+		 *
+		 * We must not do I/O operations for at least
+		 * 300us... printk does (probably acquiring spinlock
+		 * kills it)... Kills VT82C694X based
+		 * SMP board. At least mine GA-6VXD7.
+		 * 100us is not enough, 200us is enough,
+		 * so I use 300us for additional safety.
+		 */
+
+		udelay(300);
+
 		Dprintk("Startup point 1.\n");
 
 		Dprintk("Waiting for send to finish...\n");
 		timeout = 0;
 		do {
 			Dprintk("+");


Variant #2:

--- linux/arch/i386/kernel/smpboot.c	Mon Dec  4 02:48:19 2000
+++ linux/arch/i386/kernel/smpboot.c	Wed Dec 13 23:29:11 2000
@@ -694,9 +694,19 @@
 		apic_write_around(APIC_ICR, APIC_DM_STARTUP
 					| (start_eip >> 12));
 
+		/*
+		 * Petr Vandrovec:
+		 *
+		 * We must not do I/O operations for at least
+		 * 300 us... printk does (probably acquiring spinlock
+		 * kills it)... Kills VT82C694X based
+		 * SMP board. At least mine GA-6VXD7.
+
 		Dprintk("Startup point 1.\n");
 
 		Dprintk("Waiting for send to finish...\n");
+		 */
+		
 		timeout = 0;
 		do {
 			Dprintk("+");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

                 reply	other threads:[~2000-12-13 23:32 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=20001214000135.A1181@vana.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /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).