<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/irq/spurious.c, branch v3.2.92</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.92</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.92'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-07-11T12:33:34Z</updated>
<entry>
<title>genirq: Sanitize spurious interrupt detection of threaded irqs</title>
<updated>2014-07-11T12:33:34Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-03-07T13:53:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=00ff92c2da9ed2bba1f1df324129e7767eeda63a'/>
<id>urn:sha1:00ff92c2da9ed2bba1f1df324129e7767eeda63a</id>
<content type='text'>
commit 1e77d0a1ed7417d2a5a52a7b8d32aea1833faa6c upstream.

Till reported that the spurious interrupt detection of threaded
interrupts is broken in two ways:

- note_interrupt() is called for each action thread of a shared
  interrupt line. That's wrong as we are only interested whether none
  of the device drivers felt responsible for the interrupt, but by
  calling multiple times for a single interrupt line we account
  IRQ_NONE even if one of the drivers felt responsible.

- note_interrupt() when called from the thread handler is not
  serialized. That leaves the members of irq_desc which are used for
  the spurious detection unprotected.

To solve this we need to defer the spurious detection of a threaded
interrupt to the next hardware interrupt context where we have
implicit serialization.

If note_interrupt is called with action_ret == IRQ_WAKE_THREAD, we
check whether the previous interrupt requested a deferred check. If
not, we request a deferred check for the next hardware interrupt and
return.

If set, we check whether one of the interrupt threads signaled
success. Depending on this information we feed the result into the
spurious detector.

If one primary handler of a shared interrupt returns IRQ_HANDLED we
disable the deferred check of irq threads on the same line, as we have
found at least one device driver who cared.

Reported-by: Till Straumann &lt;strauman@slac.stanford.edu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Austin Schuh &lt;austin@peloton-tech.com&gt;
Cc: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Cc: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Cc: Pavel Pisa &lt;pisa@cmp.felk.cvut.cz&gt;
Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: linux-can@vger.kernel.org
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1303071450130.22263@ionos
[bwh: Backported to 3.2: adjust context, indentation]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>genirq: Avoid deadlock in spurious handling</title>
<updated>2013-03-06T03:22:34Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2012-11-23T09:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9771304decd27e25593b1c3f6cd80a91c1c8f219'/>
<id>urn:sha1:9771304decd27e25593b1c3f6cd80a91c1c8f219</id>
<content type='text'>
commit e716efde75267eab919cdb2bef5b2cb77f305326 upstream.

commit 52553ddf(genirq: fix regression in irqfixup, irqpoll)
introduced a potential deadlock by calling the action handler with the
irq descriptor lock held.

Remove the call and let the handling code run even for an interrupt
where only a single action is registered. That matches the goal of
the above commit and avoids the deadlock.

Document the confusing action = desc-&gt;action reload in the handling
loop while at it.

Reported-and-tested-by: "Wang, Warner" &lt;warner.wang@hp.com&gt;
Tested-by: Edward Donovan &lt;edward.donovan@numble.net&gt;
Cc: "Wang, Song-Bo (Stoney)" &lt;song-bo.wang@hp.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>genirq: fix regression in irqfixup, irqpoll</title>
<updated>2011-11-28T16:43:09Z</updated>
<author>
<name>Edward Donovan</name>
<email>edward.donovan@numble.net</email>
</author>
<published>2011-11-28T04:07:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=52553ddffad76ccf192d4dd9ce88d5818f57f62a'/>
<id>urn:sha1:52553ddffad76ccf192d4dd9ce88d5818f57f62a</id>
<content type='text'>
Commit fa27271bc8d2("genirq: Fixup poll handling") introduced a
regression that broke irqfixup/irqpoll for some hardware configurations.

Amidst reorganizing 'try_one_irq', that patch removed a test that
checked for 'action-&gt;handler' returning IRQ_HANDLED, before acting on
the interrupt.  Restoring this test back returns the functionality lost
since 2.6.39.  In the current set of tests, after 'action' is set, it
must precede '!action-&gt;next' to take effect.

With this and my previous patch to irq/spurious.c, c75d720fca8a, all
IRQ regressions that I have encountered are fixed.

Signed-off-by: Edward Donovan &lt;edward.donovan@numble.net&gt;
Reported-and-tested-by: Rogério Brito &lt;rbrito@ime.usp.br&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable@kernel.org (2.6.39+)
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>genirq: Fix irqfixup, irqpoll regression</title>
<updated>2011-11-03T12:12:39Z</updated>
<author>
<name>Edward Donovan</name>
<email>edward.donovan@numble.net</email>
</author>
<published>2011-11-01T19:29:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c75d720fca8a91ce99196d33adea383621027bf2'/>
<id>urn:sha1:c75d720fca8a91ce99196d33adea383621027bf2</id>
<content type='text'>
commit d05c65fff0 ("genirq: spurious: Run only one poller at a time")
introduced a regression, leaving the boot options 'irqfixup' and
'irqpoll' non-functional. The patch placed tests in each function, to
exit if the function is already running. The test in 'misrouted_irq'
exited when it should have proceeded, effectively disabling
'misrouted_irq' and 'poll_spurious_irqs'.

The check for an already running poller needs to be "!= 1" not "== 1"
as "1" is the value when the first poller starts running.

Signed-off-by: Edward Donovan &lt;edward.donovan@numble.net&gt;
Cc: maciej.rutecki@gmail.com
Link: http://lkml.kernel.org/r/1320175784-6745-1-git-send-email-edward.donovan@numble.net
Cc: stable@vger.kernel.org # &gt;= 2.6.39
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>irq: Handle spurios irq detection for threaded irqs</title>
<updated>2011-06-03T12:53:15Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>sebastian@breakpoint.cc</email>
</author>
<published>2011-05-31T06:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a43e05f4d0600e906fa09f4a65d749288c44592'/>
<id>urn:sha1:3a43e05f4d0600e906fa09f4a65d749288c44592</id>
<content type='text'>
The detection of spurios interrupts is currently limited to first level
handler. In force-threaded mode we never notice if the threaded irq does
not feel responsible.
This patch catches the return value of the threaded handler and forwards
it to the spurious detector. If the primary handler returns only
IRQ_WAKE_THREAD then the spourious detector ignores it because it gets
called again from the threaded handler.

[ tglx: Report the erroneous return value early and bail out ]

Signed-off-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Link: http://lkml.kernel.org/r/1306824972-27067-2-git-send-email-sebastian@breakpoint.cc
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Print threaded handler in spurious debug output</title>
<updated>2011-06-03T12:53:15Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>sebastian@breakpoint.cc</email>
</author>
<published>2011-05-31T06:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ef26f20cd117eb3c185038ed7cbf7b235575751d'/>
<id>urn:sha1:ef26f20cd117eb3c185038ed7cbf7b235575751d</id>
<content type='text'>
In forced threaded mode (or with an explicit threaded handler) we only
see the primary handler, but not the threaded handler.

Signed-off-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Link: http://lkml.kernel.org/r/1306824972-27067-1-git-send-email-sebastian@breakpoint.cc
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Remove compat code</title>
<updated>2011-03-29T12:48:19Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-03-28T11:32:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0c6f8a8b917ad361319c8ace3e9f28e69bfdb4c1'/>
<id>urn:sha1:0c6f8a8b917ad361319c8ace3e9f28e69bfdb4c1</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Fix typo and remove unused variable</title>
<updated>2011-03-28T18:28:56Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-03-28T18:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a6aeddd1c4e464a2150f97ca2d1c3d68cfbd9296'/>
<id>urn:sha1:a6aeddd1c4e464a2150f97ca2d1c3d68cfbd9296</id>
<content type='text'>
Sigh, I'm overworked.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Move INPROGRESS, MASKED and DISABLED state flags to irq_data</title>
<updated>2011-03-28T14:55:10Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-03-28T12:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=32f4125ebffee4f3c4dbc6a437fc656129eb9e60'/>
<id>urn:sha1:32f4125ebffee4f3c4dbc6a437fc656129eb9e60</id>
<content type='text'>
We really need these flags for some of the interrupt chips. Move it
from internal state to irq_data and provide proper accessors.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: David Daney &lt;ddaney@caviumnetworks.com&gt;
</content>
</entry>
<entry>
<title>genirq: Wrap the remaning IRQ_* flags</title>
<updated>2011-02-19T11:58:21Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-02-09T13:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1ccb4e612f68ceefb888c2c6c1def6294ea8666d'/>
<id>urn:sha1:1ccb4e612f68ceefb888c2c6c1def6294ea8666d</id>
<content type='text'>
Use wrappers to keep them away from the core code.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
