linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: George Anzinger <george@mvista.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Catching NForce2 lockup with NMI watchdog
Date: Wed, 17 Dec 2003 15:03:04 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.55.0312171410190.7484@jurand.ds.pg.gda.pl> (raw)
In-Reply-To: <3FDF7ED3.5020802@mvista.com>

On Tue, 16 Dec 2003, George Anzinger wrote:

> How confusing :(  Could you give me some idea how this works?  I have tried 
> disable_irq(0) and, as best as I can tell, it does not do the trick.  The 
> confusion I have is understanding where in the chain of hardware each of these 
> thing is taking place.

 Well, strange -- it should mask the timer interrupt.  But I've never 
tried that and have proposed based on a source study only -- perhaps it 
needs to be further investigated.

> For example, it would be "nice" if I could just turn off the PIT interrupt line 
> so that both the NMI (PIT generated) and the PIT interrupt would be put on hold. 

 The counter gate of the 8254 chip is designed to do just that -- it's a
pity it's hardwired, but I can understand another SSI TTL latch of a
dubious utility was just too costly for the original PC in 1981.

>   Your answer seems to indicate that disable_irq() is working down stream from 
> where the NMI signal is connected to the PIT interrupt line, so we need to turn 
> of the NMI as well.  A picture would be nice here :)

 I'll try my best:

 +------+ OUT0                                INTIN2 +--------+
 | 8254 +--+-----------------------------------------+        |
 +------+  |                                         |  I/O   |
           | IR0 +------+ INT +------+        INTIN0 |  APIC  |
           +-----+ 8259 +-----+ glue +-+-------------+        |
                 +------+     +------+ |             +---++---+
                                       |                 ||
                                       |                 ||
                                       |                 ||
                           +-----------+---------+-...   ||
                           |                     |       ||
        +--------+         |  +--------+         |       ||
        | CPU #0 |         |  | CPU #1 |         |       ||
        +--------+         |  +--------+         |       ||
        |        | LINT0   |  |        | LINT0   | ...   ||
        | local  +---------+  | local  +---------+       ||
        | APIC   |            | APIC   |                 ||
        |        |            |        |                 ||
        +---++---+            +---++---+                 ||
            ||                    ||                     ||
            || inter-APIC bus     ||                     ||
            ++====================++===============...===++

The system is a traditional i82489DX/Pentium/P6-style virtual-wire setup
with a serial inter-APIC bus and a full MP-spec feature set.  More limited
systems may miss the OUT0->INTIN2 line and/or one or more of the
INT->INTIN0 or INT->LINT0 -- there needs to be only one.  If any INT->sth
connections are missing then either the INT->LINT0 one for the bootstrap
processor (BSP) or the INT->LINT0 has to exist; other are optional.

 For the system above the path for the 8254 timer interrupt is via INTIN2
and the inter-APIC bus as a LoPri APIC interrupt.  The path for the NMI
watchdog is via the 8259 reconfigured to pass IR0 transparently to INT and
then LINT0 inputs of all processors, reconfigured for a NMI APIC
interrupt.  Some glue at the INT output may prevent the NMI watchdog from
working -- the LINT0 inputs may not toggle back and forth.

 If the OUT0->INTIN2 line is missing, the path for the 8254 timer
interrupt is via the 8259 reconfigured to pass IR0 transparently to INT,
then INTIN0 and the inter-APIC bus as a LoPri APIC interrupt.  The path
for the NMI watchdog is also via the 8259 and then LINT0 inputs of all
processors, reconfigured for a NMI APIC interrupt.  Again, some glue at
the INT output may prevent this set up from working, but if it does work,
then both the timer interrupt and the NMI watchdog do -- I've not heard of
a system having different glue logic for INTIN0 and LINT0.

 If the above variant does not work, as a last resort, the path for the
8254 timer interrupt is via the 8259 reconfigured back into its usual mode
and then LINT0 of the BSP reconfigured for an ExtINTA APIC interrupt.  
Additionally, since at this point the glue logic has probably already
locked up due to the messing done above, a few artiffical sets of double
INTA cycles are sent to the system bus using the RTC chip and INTIN8
reconfigured temporarily to send ExtINTA APIC interrupts via the
inter-APIC bus.

 I do hope a thorough read of the description will make the available
variants clear.  The I/O APIC input numbers may differ but so far they are
almost always as noted above.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

  reply	other threads:[~2003-12-17 14:03 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-05  4:54 Catching NForce2 lockup with NMI watchdog Jesse Allen
2003-12-05  7:40 ` Mikael Pettersson
2003-12-05  8:33   ` Josh McKinney
2003-12-05 12:14     ` Mikael Pettersson
2003-12-05 14:19       ` Craig Bradney
2003-12-05 17:05         ` Craig Bradney
2003-12-05 18:11         ` Josh McKinney
2003-12-05  8:58   ` Mike Fedyk
2003-12-05 12:06     ` Mikael Pettersson
2003-12-08  2:20     ` Bob
2003-12-09 14:21       ` Maciej W. Rozycki
2003-12-09 16:35         ` Bob
2003-12-10 13:41           ` Maciej W. Rozycki
2003-12-12 16:01             ` bill davidsen
2003-12-12 16:47               ` Maciej W. Rozycki
2003-12-12 16:57                 ` Richard B. Johnson
2003-12-12 17:21                   ` Maciej W. Rozycki
2003-12-13  5:16                 ` Bill Davidsen
2003-12-15 13:23                   ` Maciej W. Rozycki
2003-12-12 22:27               ` George Anzinger
2003-12-15 13:13                 ` Maciej W. Rozycki
2003-12-15 21:42                   ` George Anzinger
2003-12-16 13:37                     ` Maciej W. Rozycki
2003-12-16 13:57                       ` Richard B. Johnson
2003-12-16 15:47                         ` Maciej W. Rozycki
2003-12-16 16:44                           ` Richard B. Johnson
2003-12-16 16:50                             ` Maciej W. Rozycki
2003-12-16 17:26                       ` George Anzinger
2003-12-16 20:54                         ` Maciej W. Rozycki
2003-12-16 21:53                           ` George Anzinger
2003-12-17 14:03                             ` Maciej W. Rozycki [this message]
2003-12-05 19:11 Allen Martin
2003-12-05 20:18 ` cheuche+lkml
2003-12-05 20:34   ` Prakash K. Cheemplavam
2003-12-05 21:02     ` Mike Fedyk
2003-12-05 20:55   ` Jesse Allen
2003-12-06  3:20   ` Jesse Allen
2003-12-05 20:36 ` Jesse Allen
2003-12-05 22:55 ` Mike Fedyk
2003-12-05 23:11   ` Craig Bradney
2003-12-05 20:56 Allen Martin
2003-12-05 22:41 b
2003-12-07 19:58 Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered Ian Kumlien
2003-12-08  2:07 ` Ross Dickson
2003-12-09 18:12   ` Catching NForce2 lockup with NMI watchdog Ian Kumlien
2003-12-09 22:04     ` Craig Bradney
2003-12-09 23:13       ` Ian Kumlien
2003-12-10  6:14       ` Bob
2003-12-10  7:51         ` Craig Bradney
2003-12-13  3:56 Ross Dickson
2003-12-15 13:16 ` Maciej W. Rozycki
2003-12-17 18:14 Ross Dickson
2003-12-17 21:41 ` George Anzinger
2003-12-17 21:48 ` George Anzinger
2003-12-18  1:30   ` Ross Dickson
2003-12-18 14:32     ` Maciej W. Rozycki
2003-12-19  4:17       ` Ross Dickson
2003-12-19 15:35         ` Maciej W. Rozycki
2003-12-18 14:04 ` Maciej W. Rozycki
2003-12-18 14:22   ` Craig Bradney
2003-12-19  5:38     ` Ross Dickson
2003-12-19 10:36       ` Craig Bradney
2003-12-19  4:06   ` Ross Dickson
2003-12-19 15:33     ` 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=Pine.LNX.4.55.0312171410190.7484@jurand.ds.pg.gda.pl \
    --to=macro@ds2.pg.gda.pl \
    --cc=george@mvista.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).