public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Jeroen Van den Keybus <jeroen.vandenkeybus@gmail.com>
Cc: "Huang, Shane" <Shane.Huang@amd.com>,
	Borislav Petkov <bp@amd64.org>,
	"Nguyen, Dong" <Dong.Nguyen@amd.com>,
	linux-kernel@vger.kernel.org,
	linux1394-devel@lists.sourceforge.net
Subject: Re: Unhandled IRQs on AMD E-450
Date: Thu, 08 Dec 2011 13:45:10 +0100	[thread overview]
Message-ID: <4EE0B156.4080708@ladisch.de> (raw)
In-Reply-To: <CAPRPZsBzBNzrzbNDN2fBnWwQ-MYcRssfY5V+5mDXLbJ+-gd9SA@mail.gmail.com>

Jeroen Van den Keybus wrote:
> I have the impression that I see the same failure mechanism for both
> IRQs. All goes well for a while, until an IRQ storm starts right
> (e1000: 19 us, firewire-ohci: 39 us) after a valid IRQ.
>
> Therefore there is a strong correlation between the arrival of the
> spurious interrupt, alledgedly caused by a mystery device, and the
> earlier arrival of a valid interrupt for a device. Combined with the
> fact that it happens on 2 different IRQs pretty much rules out the
> possibilty for me that there is either a mystery device at all, or
> that the existing devices would both be defective, does it not ?

There appears to be a problem with the interrupt handling.

In PCI, interrupts are level-triggered, which means that the interrupt
line (INTx) is active when it's at level 0 and inactive when it's at
level 1.  When a device wants to trigger an interrupt, it outputs zero
on its interrupt output.  The level doesn't get reset to 1 until the
driver acknowledges the interrupt (in e1000, read of the ICR; in
firewire-ohci, write of IntEventClear).  As long as the line stays at 0,
all interrupt handlers will continue being called.  This mechanism
allows multiple devices to share one interrupt line.

In PCI Express, there are only one-to-one connections, and there are no
separate interrupt lines.  A device raises an interrupt by sending
an interrupt message, which could be understood as a memory write to
a special address at the interrupt controller.  Nothing needs to be done
to deactive the interrupt; if the device has another reason for
an interrupt, it just sends another interrupt message.

When a PCI device is connected to a PCI Express system, the old INTx
interrupt line must be converted to PCI Express messages.  This is done
with _two_ special messages, Assert_INTx and Deassert_INTx.  The first
tells the interrupt controller that some INTx line went from 1 to 0, the
second tells it that it went from 0 back to 1; this allows the interrupt
controller to implement the level-triggered behaviour.

It appears that some Deassert_INTx messages get lost on your system.
There are no indications of any other missing PCIe packets, so this
looks like a problem with the interrupt handling in your PCI/PCIe
bridge, the ASM1083 chip.

> I also do not understand, if there would be a stuck IRQ line, why I
> can unload and reload e1000 and firewire-ohci without immediately
> getting the same IRQ storm.

Linux will reenable the interrupt line when a new driver attaches to it.
At this point, it's still stuck, but the device initialization will
trigger some actual interrupts, and after the first assert/deassert
pair, the line will be unstuck.


Regards,
Clemens

  reply	other threads:[~2011-12-08 12:43 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 21:44 Unhandled IRQs on AMD E-450 Jeroen Van den Keybus
2011-11-30  8:30 ` Clemens Ladisch
2011-11-30 15:44 ` Borislav Petkov
2011-12-01  8:01   ` Huang, Shane
2011-12-03 20:36     ` Jeroen Van den Keybus
2011-12-04 12:48       ` Clemens Ladisch
2011-12-04 13:36         ` Jeroen Van den Keybus
2011-12-04 13:54           ` Jeroen Van den Keybus
2011-12-04 14:08             ` Jeroen Van den Keybus
2011-12-04 15:06               ` Jeroen Van den Keybus
2011-12-04 16:59                 ` Clemens Ladisch
2011-12-06  0:06                   ` Jeroen Van den Keybus
2011-12-08 11:33                     ` Jeroen Van den Keybus
2011-12-08 12:45                       ` Clemens Ladisch [this message]
2011-12-08 21:27                         ` Jeroen Van den Keybus
2011-12-09  8:22                           ` Clemens Ladisch
2011-12-09 11:17                             ` Jeroen Van den Keybus
2011-12-09 12:55                               ` Clemens Ladisch
2011-12-10 12:10                                 ` Jeroen Van den Keybus
2011-12-10 17:58                                   ` Clemens Ladisch
2011-12-11 15:28                                     ` Jeroen Van den Keybus
     [not found] <fa.CZQqvHf3CBfYWzhSDPNOWxTTD9w@ifi.uio.no>
     [not found] ` <fa.Vmg5vDod2/oKvwyy9BcalhoT+Lo@ifi.uio.no>
2012-04-25  8:35   ` andymatei
2012-04-25  8:48     ` Clemens Ladisch
2012-04-27  8:22       ` Borislav Petkov
2012-04-27  8:29         ` Andrei Matei
2012-04-27 11:46         ` Jeroen Van den Keybus
2012-04-27 13:06           ` Josh Boyer
2012-04-27 13:28             ` Jeroen Van den Keybus
2012-04-27 13:49               ` Josh Boyer
2012-04-30  8:29                 ` Jeroen Van den Keybus
2012-04-30  9:57                   ` Clemens Ladisch
2012-04-30 10:41                     ` Jeroen Van den Keybus
2012-04-30 12:47                       ` Clemens Ladisch
2012-05-29 22:20                       ` Grant Likely
2012-04-30 10:21                   ` Borislav Petkov
2012-04-30 11:35                     ` Jeroen Van den Keybus
2012-05-29 23:36                       ` Grant Likely
2012-05-30  0:07                       ` Thomas Gleixner
2012-05-30 10:44                         ` Borislav Petkov
     [not found] <fa.Tzg9rJm1oEMGIL8eap99R7gLU4Q@ifi.uio.no>
     [not found] ` <fa.Yw7gRhZrXlfCxofC1BHK22C+oTk@ifi.uio.no>
     [not found]   ` <fa.l7CBcHbzr+l317AuKP87w9mccUk@ifi.uio.no>
     [not found]     ` <fa.VXfk4ts2TBVKqgBQtfGn6RQHemg@ifi.uio.no>
2012-04-25  8:48       ` andymatei

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=4EE0B156.4080708@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=Dong.Nguyen@amd.com \
    --cc=Shane.Huang@amd.com \
    --cc=bp@amd64.org \
    --cc=jeroen.vandenkeybus@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /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