<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/irq, branch v2.6.34</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.34</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.34'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-04-06T20:03:22Z</updated>
<entry>
<title>Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-04-06T20:03:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-04-06T20:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94c4fcec0144e032ef7d4ec761ab81d570b0bc2a'/>
<id>urn:sha1:94c4fcec0144e032ef7d4ec761ab81d570b0bc2a</id>
<content type='text'>
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Force MSI irq handlers to run with interrupts disabled
</content>
</entry>
<entry>
<title>genirq: Force MSI irq handlers to run with interrupts disabled</title>
<updated>2010-03-31T13:48:38Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2010-03-31T11:30:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=753649dbc49345a73a2454c770a3f2d54d11aec6'/>
<id>urn:sha1:753649dbc49345a73a2454c770a3f2d54d11aec6</id>
<content type='text'>
Network folks reported that directing all MSI-X vectors of their multi
queue NICs to a single core can cause interrupt stack overflows when
enough interrupts fire at the same time.

This is caused by the fact that we run interrupt handlers by default
with interrupts enabled unless the driver reuqests the interrupt with
the IRQF_DISABLED set. The NIC handlers do not set this flag, so
simultaneous interrupts can nest unlimited and cause the stack
overflow.

The only safe counter measure is to run the interrupt handlers with
interrupts disabled. We can't switch to this mode in general right
now, but it is safe to do so for MSI interrupts.

Force IRQF_DISABLED for MSI interrupt handlers.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Linus Torvalds &lt;torvalds@osdl.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-03-26T22:09:06Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-03-26T22:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=309d1dcb5b73ab1f8212aff3037a7bcb46afe819'/>
<id>urn:sha1:309d1dcb5b73ab1f8212aff3037a7bcb46afe819</id>
<content type='text'>
* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Move two IRQ functions from .init.text to .text
  genirq: Protect access to irq_desc-&gt;action in can_request_irq()
  genirq: Prevent oneshot irq thread race
</content>
</entry>
<entry>
<title>genirq: Move two IRQ functions from .init.text to .text</title>
<updated>2010-03-24T13:38:23Z</updated>
<author>
<name>Henrik Kretzschmar</name>
<email>henne@nachtwindheim.de</email>
</author>
<published>2010-03-24T11:59:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=860652bfb890bd861c999ec39fcffabe5b712f85'/>
<id>urn:sha1:860652bfb890bd861c999ec39fcffabe5b712f85</id>
<content type='text'>
Both functions should not be marked as __init, since they be called
from modules after the init section is freed.

Signed-off-by: Henrik Kretzschmar &lt;henne@nachtwindheim.de&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
LKML-Reference: &lt;1269431961-5731-1-git-send-email-henne@nachtwindheim.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Protect access to irq_desc-&gt;action in can_request_irq()</title>
<updated>2010-03-24T13:38:23Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2010-03-23T21:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc8c3b78433222e5dbc1fdfcfdde29e1743f181a'/>
<id>urn:sha1:cc8c3b78433222e5dbc1fdfcfdde29e1743f181a</id>
<content type='text'>
can_request_irq() accesses and dereferences irq_desc-&gt;action w/o
holding irq_desc-&gt;lock. So action can be freed on another CPU before
it's dereferenced. Unlikely, but ...

Protect it with desc-&gt;lock.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Prevent oneshot irq thread race</title>
<updated>2010-03-10T16:45:14Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2010-03-09T18:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b1adaa031a55e44f5dd942f234bf09d28e8a0d6'/>
<id>urn:sha1:0b1adaa031a55e44f5dd942f234bf09d28e8a0d6</id>
<content type='text'>
Lars-Peter pointed out that the oneshot threaded interrupt handler
code has the following race:

 CPU0                            CPU1
 hande_level_irq(irq X)
   mask_ack_irq(irq X)
   handle_IRQ_event(irq X)
     wake_up(thread_handler)
                                 thread handler(irq X) runs
                                 finalize_oneshot(irq X)
				  does not unmask due to 
				  !(desc-&gt;status &amp; IRQ_MASKED)

 return from irq
 does not unmask due to
 (desc-&gt;status &amp; IRQ_ONESHOT)
  				  
This leaves the interrupt line masked forever. 

The reason for this is the inconsistent handling of the IRQ_MASKED
flag. Instead of setting it in the mask function the oneshot support
sets the flag after waking up the irq thread.

The solution for this is to set/clear the IRQ_MASKED status whenever
we mask/unmask an interrupt line. That's the easy part, but that
cleanup opens another race:

 CPU0                            CPU1
 hande_level_irq(irq)
   mask_ack_irq(irq)
   handle_IRQ_event(irq)
     wake_up(thread_handler)
                                 thread handler(irq) runs
                                 finalize_oneshot_irq(irq)
				  unmask(irq)
     irq triggers again
     handle_level_irq(irq)
       mask_ack_irq(irq)
     return from irq due to IRQ_INPROGRESS				  

 return from irq
 does not unmask due to
 (desc-&gt;status &amp; IRQ_ONESHOT)

This requires that we synchronize finalize_oneshot_irq() with the
primary handler. If IRQ_INPROGESS is set we wait until the primary
handler on the other CPU has returned before unmasking the interrupt
line again.

We probably have never seen that problem because it does not happen on
UP and on SMP the irqbalancer protects us by pinning the primary
handler and the thread to the same CPU.

Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>Merge branch 'for-next' into for-linus</title>
<updated>2010-03-08T15:55:37Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2010-03-08T15:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=318ae2edc3b29216abd8a2510f3f80b764f06858'/>
<id>urn:sha1:318ae2edc3b29216abd8a2510f3f80b764f06858</id>
<content type='text'>
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
</content>
</entry>
<entry>
<title>sparseirq: Use radix_tree instead of ptrs array</title>
<updated>2010-02-18T01:27:20Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2010-02-10T09:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5eb78f76ddfa7caf4340cf6893b032f45d8114a'/>
<id>urn:sha1:b5eb78f76ddfa7caf4340cf6893b032f45d8114a</id>
<content type='text'>
Use radix_tree irq_desc_tree instead of irq_desc_ptrs.

-v2: according to Eric and cyrill to use radix_tree_lookup_slot and
     radix_tree_replace_slot

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
LKML-Reference: &lt;1265793639-15071-32-git-send-email-yinghai@kernel.org&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>sparseirq: Change irq_desc_ptrs to static</title>
<updated>2010-02-18T01:27:03Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2010-02-10T09:20:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99558f0bbe68cb09799ec38adbaa3f3b2dc7ba63'/>
<id>urn:sha1:99558f0bbe68cb09799ec38adbaa3f3b2dc7ba63</id>
<content type='text'>
Add replace_irq_desc() instead of poking at the array directly.

-v2: remove unneeded boundary check in replace_irq_desc

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
LKML-Reference: &lt;1265793639-15071-31-git-send-email-yinghai@kernel.org&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
</feed>
