From: John Ogness <john.ogness@linutronix.de>
To: Sekhar Nori <nsekhar@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Marc Zyngier <marc.zyngier@arm.com>, Felipe Balbi <balbi@ti.com>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqchip: omap-intc: fix spurious irq handling
Date: Tue, 20 Oct 2015 09:32:54 +0200 [thread overview]
Message-ID: <876122c7vd.fsf@linutronix.de> (raw)
In-Reply-To: <5625DD9F.6010106@ti.com> (Sekhar Nori's message of "Tue, 20 Oct 2015 11:52:23 +0530")
On 2015-10-20, Sekhar Nori <nsekhar@ti.com> wrote:
>> Do you know what really is causing the spurious interrupts in your
>> case?
>
> No, not yet.
According to the TRM this is normal behavior if conditions that might
affect priority are changed during priority sorting.
6.2.5 ARM A8 INTC Spurious Interrupt Handling
The spurious flag indicates whether the result of the sorting (a
window of 10 INTC functional clock cycles after the interrupt
assertion) is invalid. The sorting is invalid if:
- The interrupt that triggered the sorting is no longer active
during the sorting.
- A change in the mask has affected the result during the sorting
time.
>> In all the cases I've seen, the spurious interrupts were caused by a
>> missing flush of posted write acking the IRQ at the device driver.
>> for the _previously triggered_ INTC interrupt.
>>
>> If you have a reproducable case, I suggest you test that by printing
>> out the previous interrupt to check if that makes sense. And then see
>> if adding the missing read back to that interrupt handler fixes the
>> issue.
>
> Okay, thats good to know. Thanks for the hints and history of your debug
> on OMAP3. The issue is not easily reproducible in my case. But if I try
> hard enough, I can get hit it though. So I can surely try your hints.
I can reproduce the situation very easily. After running a test for a
few minutes and printing out the previous interrupt, I have the
following list. These are the irq numbers seen by the handler before the
spurious interrupt triggered.
INT12 - EDMACOMPINT - TPCC (EDMA)
INT41 - 3PGSWRXINT0 - CPSW (Ethernet)
INT42 - 3PGSWTXINT0 - CPSW (Ethernet)
INT68 - TINT2 - DMTIMER2
INT72 - UART0INT - UART0
>From this I do not think we can put the blame on any single driver. I
trigger this situation very easily by putting a load of 7,000+
interrupts per second on the system. This means we have 70,000 INTC
clock cycles per second where a change in the interrupt priority
conditions would cause the priority sorting to become invalid and thus
cause the spurious interrupt.
I'm not sure if we can/should do anything more than Sekhar's patch of
acknowledging the spurious interrupt so the priority sorting algorithm
can run again.
John Ogness
next prev parent reply other threads:[~2015-10-20 7:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 9:46 [PATCH] irqchip: omap-intc: fix spurious irq handling Sekhar Nori
2015-10-19 10:13 ` Thomas Gleixner
2015-10-19 14:50 ` Tony Lindgren
2015-10-20 6:22 ` Sekhar Nori
2015-10-20 7:32 ` John Ogness [this message]
2015-10-20 14:52 ` Tony Lindgren
2015-12-03 11:28 ` Sekhar Nori
2015-12-03 15:02 ` Tony Lindgren
2015-12-03 15:24 ` Sekhar Nori
2015-12-03 15:39 ` Tony Lindgren
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=876122c7vd.fsf@linutronix.de \
--to=john.ogness@linutronix.de \
--cc=balbi@ti.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=nsekhar@ti.com \
--cc=tglx@linutronix.de \
--cc=tony@atomide.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).