<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/irq, branch v2.6.20.21</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Clear spurious irq stat information when adding irq handler</title>
<updated>2007-01-23T22:16:31+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@woody.linux-foundation.org</email>
</author>
<published>2007-01-23T22:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8528b0f1de1101c6002036fd53638fb21111d0ea'/>
<id>8528b0f1de1101c6002036fd53638fb21111d0ea</id>
<content type='text'>
Any newly added irq handler may obviously make any old spurious irq
status invalid, since the new handler may well be the thing that is
supposed to handle any interrupts that came in.

So just clear the statistics when adding handlers.

Pointed-out-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Any newly added irq handler may obviously make any old spurious irq
status invalid, since the new handler may well be the thing that is
supposed to handle any interrupts that came in.

So just clear the statistics when adding handlers.

Pointed-out-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] x86-64: Make noirqdebug_setup function non init to fix modpost warning</title>
<updated>2007-01-11T00:52:44+00:00</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@in.ibm.com</email>
</author>
<published>2007-01-11T00:52:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=343cde51b3b856470eea24a89f00166b8e2d7272'/>
<id>343cde51b3b856470eea24a89f00166b8e2d7272</id>
<content type='text'>
o noirqdebug_setup() is __init but it is being called by
  quirk_intel_irqbalance() which if of type __devinit. If CONFIG_HOTPLUG=y,
  quirk_intel_irqbalance() is put into text section and it is wrong to
  call a function in __init section.

o MODPOST flags this on i386 if CONFIG_RELOCATABLE=y

WARNING: vmlinux - Section mismatch: reference to .init.text:noirqdebug_setup from .text between 'quirk_intel_irqbalance' (at offset 0xc010969e) and 'i8237A_suspend'

o Make noirqdebug_setup() non-init.

Signed-off-by: Vivek Goyal &lt;vgoyal@in.ibm.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o noirqdebug_setup() is __init but it is being called by
  quirk_intel_irqbalance() which if of type __devinit. If CONFIG_HOTPLUG=y,
  quirk_intel_irqbalance() is put into text section and it is wrong to
  call a function in __init section.

o MODPOST flags this on i386 if CONFIG_RELOCATABLE=y

WARNING: vmlinux - Section mismatch: reference to .init.text:noirqdebug_setup from .text between 'quirk_intel_irqbalance' (at offset 0xc010969e) and 'i8237A_suspend'

o Make noirqdebug_setup() non-init.

Signed-off-by: Vivek Goyal &lt;vgoyal@in.ibm.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] genirq: fix irq flow handler uninstall</title>
<updated>2006-12-22T16:55:48+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2006-12-22T09:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9d7ac8be4b48737ad1cebd94ed754a269f360708'/>
<id>9d7ac8be4b48737ad1cebd94ed754a269f360708</id>
<content type='text'>
The sanity check for no_irq_chip in __set_irq_hander() is unconditional on
both install and uninstall of an handler.  This triggers false warnings and
replaces no_irq_chip by dummy_irq_chip in the uninstall case.

Check only, when a real handler is installed.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Sylvain Munaut &lt;tnt@246tNt.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sanity check for no_irq_chip in __set_irq_hander() is unconditional on
both install and uninstall of an handler.  This triggers false warnings and
replaces no_irq_chip by dummy_irq_chip in the uninstall case.

Check only, when a real handler is installed.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Sylvain Munaut &lt;tnt@246tNt.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] __set_irq_handler bogus space</title>
<updated>2006-12-21T08:08:27+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>Geert.Uytterhoeven@sonycom.com</email>
</author>
<published>2006-12-20T14:59:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b039db8eeab0b3cee66dcf9820526dd9cfb04f6b'/>
<id>b039db8eeab0b3cee66dcf9820526dd9cfb04f6b</id>
<content type='text'>
__set_irq_handler: Kill a bogus space

Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__set_irq_handler: Kill a bogus space

Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] CPEI gets warning at kernel/irq/migration.c:27/move_masked_irq()</title>
<updated>2006-12-08T16:28:37+00:00</updated>
<author>
<name>Hidetoshi Seto</name>
<email>seto.hidetoshi@jp.fujitsu.com</email>
</author>
<published>2006-12-08T10:35:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6e2ac66470976ad7f57e0948572669b2bdfea2d0'/>
<id>6e2ac66470976ad7f57e0948572669b2bdfea2d0</id>
<content type='text'>
While running my MCA test (hardware error injection) on 2.6.19,
I got some warning like following:

&gt; BUG: warning at kernel/irq/migration.c:27/move_masked_irq()
&gt;
&gt; Call Trace:
&gt;  [&lt;a000000100013d20&gt;] show_stack+0x40/0xa0
&gt;                                 sp=e00000006b2578d0 bsp=e00000006b2510b0
&gt;  [&lt;a000000100013db0&gt;] dump_stack+0x30/0x60
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251098
&gt;  [&lt;a0000001000de430&gt;] move_masked_irq+0xb0/0x240
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251070
&gt;  [&lt;a0000001000de6a0&gt;] move_native_irq+0xe0/0x180
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251040
&gt;  [&lt;a00000010004ff50&gt;] iosapic_end_level_irq+0x30/0xe0
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251020
&gt;  [&lt;a0000001000d94d0&gt;] __do_IRQ+0x170/0x400
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b250fd8
&gt;  [&lt;a0000001000116f0&gt;] ia64_handle_irq+0x1b0/0x260
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b250fa8
&gt;  [&lt;a00000010000c3a0&gt;] ia64_leave_kernel+0x0/0x280
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b250fa8
&gt;  [&lt;a000000100690cf0&gt;] _spin_unlock_irqrestore+0x30/0x60
&gt;                                 sp=e00000006b257c70 bsp=e00000006b250f90

It comes from:

[kernel/irq/migration.c]
  26         if (CHECK_IRQ_PER_CPU(desc-&gt;status)) {
  27                 WARN_ON(1);
  28                 return;
  29         }

By putting some printk in kernel, I found that irqbalance is trying to
move CPEI which is handled as PER_CPU irq. That's why.

CPEI(Corrected Platform Error Interrupt) is ia64 specific irq, is
allowed to pin to particular processor which selected by the platform, and
even it is PER_CPU but it has set_affinity handler (=iosapic_set_affinity)
as same as other IO-SAPIC-level interrupts. (I don't know why, but
I guess that there would be typical situation where the handler for
migration is needed, such as hotplug - the processor going to be
offline/hot-removed.)

To shut up this warning, there are 2 way at least:
 a) fix CPEI stuff
 b) prohibit setting affinity to PER_CPU irq

I'm not sure what stuff of CPEI need to be fixed, but I think that
returning error to attempting move PER_CPU irq is useful for all
applications since it will never work.

Following small patch takes b) style.
It works, the warning disappeared and irqbalance still runs well.

Signed-off-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.com&gt;
Cc: Arjan van de Ven &lt;arjan@infradead.org&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While running my MCA test (hardware error injection) on 2.6.19,
I got some warning like following:

&gt; BUG: warning at kernel/irq/migration.c:27/move_masked_irq()
&gt;
&gt; Call Trace:
&gt;  [&lt;a000000100013d20&gt;] show_stack+0x40/0xa0
&gt;                                 sp=e00000006b2578d0 bsp=e00000006b2510b0
&gt;  [&lt;a000000100013db0&gt;] dump_stack+0x30/0x60
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251098
&gt;  [&lt;a0000001000de430&gt;] move_masked_irq+0xb0/0x240
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251070
&gt;  [&lt;a0000001000de6a0&gt;] move_native_irq+0xe0/0x180
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251040
&gt;  [&lt;a00000010004ff50&gt;] iosapic_end_level_irq+0x30/0xe0
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b251020
&gt;  [&lt;a0000001000d94d0&gt;] __do_IRQ+0x170/0x400
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b250fd8
&gt;  [&lt;a0000001000116f0&gt;] ia64_handle_irq+0x1b0/0x260
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b250fa8
&gt;  [&lt;a00000010000c3a0&gt;] ia64_leave_kernel+0x0/0x280
&gt;                                 sp=e00000006b257aa0 bsp=e00000006b250fa8
&gt;  [&lt;a000000100690cf0&gt;] _spin_unlock_irqrestore+0x30/0x60
&gt;                                 sp=e00000006b257c70 bsp=e00000006b250f90

It comes from:

[kernel/irq/migration.c]
  26         if (CHECK_IRQ_PER_CPU(desc-&gt;status)) {
  27                 WARN_ON(1);
  28                 return;
  29         }

By putting some printk in kernel, I found that irqbalance is trying to
move CPEI which is handled as PER_CPU irq. That's why.

CPEI(Corrected Platform Error Interrupt) is ia64 specific irq, is
allowed to pin to particular processor which selected by the platform, and
even it is PER_CPU but it has set_affinity handler (=iosapic_set_affinity)
as same as other IO-SAPIC-level interrupts. (I don't know why, but
I guess that there would be typical situation where the handler for
migration is needed, such as hotplug - the processor going to be
offline/hot-removed.)

To shut up this warning, there are 2 way at least:
 a) fix CPEI stuff
 b) prohibit setting affinity to PER_CPU irq

I'm not sure what stuff of CPEI need to be fixed, but I think that
returning error to attempting move PER_CPU irq is useful for all
applications since it will never work.

Following small patch takes b) style.
It works, the warning disappeared and irqbalance still runs well.

Signed-off-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.com&gt;
Cc: Arjan van de Ven &lt;arjan@infradead.org&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] lockdep: name some old style locks</title>
<updated>2006-12-07T16:39:36+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2006-12-07T04:37:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6cfd76a26d9fe2ba54b9d496a48c1d9285e5c5ed'/>
<id>6cfd76a26d9fe2ba54b9d496a48c1d9285e5c5ed</id>
<content type='text'>
Name some of the remaning 'old_style_spin_init' locks

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Name some of the remaning 'old_style_spin_init' locks

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't call "note_interrupt()" with irq descriptor lock held</title>
<updated>2006-11-22T17:32:06+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@woody.osdl.org</email>
</author>
<published>2006-11-22T17:32:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b42172fc7b569a0ef2b0fa38d71382969074c0e2'/>
<id>b42172fc7b569a0ef2b0fa38d71382969074c0e2</id>
<content type='text'>
This reverts commit f72fa707604c015a6625e80f269506032d5430dc, and solves
the problem that it tried to fix by simply making "__do_IRQ()" call the
note_interrupt() function without the lock held, the way everybody else
does.

It should be noted that all interrupt handling code must never allow the
descriptor actors to be entered "recursively" (that's why we do all the
magic IRQ_PENDING stuff in the first place), so there actually is
exclusion at that much higher level, even in the absense of locking.

Acked-by: Vivek Goyal &lt;vgoyal@in.ibm.com&gt;
Acked-by:Pavel Emelianov &lt;xemul@openvz.org&gt;
Cc: Andrew Morton &lt;akpm@osdl.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit f72fa707604c015a6625e80f269506032d5430dc, and solves
the problem that it tried to fix by simply making "__do_IRQ()" call the
note_interrupt() function without the lock held, the way everybody else
does.

It should be noted that all interrupt handling code must never allow the
descriptor actors to be entered "recursively" (that's why we do all the
magic IRQ_PENDING stuff in the first place), so there actually is
exclusion at that much higher level, even in the absense of locking.

Acked-by: Vivek Goyal &lt;vgoyal@in.ibm.com&gt;
Acked-by:Pavel Emelianov &lt;xemul@openvz.org&gt;
Cc: Andrew Morton &lt;akpm@osdl.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] some irq_chip variables point to NULL</title>
<updated>2006-11-16T19:43:37+00:00</updated>
<author>
<name>Zhang, Yanmin</name>
<email>yanmin_zhang@linux.intel.com</email>
</author>
<published>2006-11-16T09:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b86432b42eba5671969a9e6483ee219674b7ee25'/>
<id>b86432b42eba5671969a9e6483ee219674b7ee25</id>
<content type='text'>
I got an oops when booting 2.6.19-rc5-mm1 on my ia64 machine.

Below is the log.

Oops 11012296146944 [1]
Modules linked in: binfmt_misc dm_mirror dm_multipath dm_mod thermal processor f
an container button sg eepro100 e100 mii

Pid: 0, CPU 0, comm:              swapper
psr : 0000121008022038 ifs : 800000000000040b ip  : [&lt;a0000001000e1411&gt;]    Not
tainted
ip is at __do_IRQ+0x371/0x3e0
unat: 0000000000000000 pfs : 000000000000040b rsc : 0000000000000003
rnat: 656960155aa56aa5 bsps: a00000010058b890 pr  : 656960155aa55a65
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f
csd : 0000000000000000 ssd : 0000000000000000
b0  : a0000001000e1390 b6  : a0000001005beac0 b7  : e00000007f01aa00
f6  : 000000000000000000000 f7  : 0ffe69090000000000000
f8  : 1000a9090000000000000 f9  : 0ffff8000000000000000
f10 : 1000a908ffffff6f70000 f11 : 1003e0000000000000909
r1  : a000000100fbbff0 r2  : 0000000000010002 r3  : 0000000000010001
r8  : fffffffffffbffff r9  : a000000100bd8060 r10 : a000000100dd83b8
r11 : fffffffffffeffff r12 : a000000100bcbbb0 r13 : a000000100bc4000
r14 : 0000000000010000 r15 : 0000000000010000 r16 : a000000100c01aa8
r17 : a000000100d2c350 r18 : 0000000000000000 r19 : a000000100d2c300
r20 : a000000100c01a88 r21 : 0000000080010100 r22 : a000000100c01ac0
r23 : a0000001000108e0 r24 : e000000477980004 r25 : 0000000000000000
r26 : 0000000000000000 r27 : e00000000913400c r28 : e0000004799ee51c
r29 : e0000004778b87f0 r30 : a000000100d2c300 r31 : a00000010005c7e0

Call Trace:
 [&lt;a000000100014600&gt;] show_stack+0x40/0xa0
                                sp=a000000100bcb760 bsp=a000000100bc4f40
 [&lt;a000000100014f00&gt;] show_regs+0x840/0x880
                                sp=a000000100bcb930 bsp=a000000100bc4ee8
 [&lt;a000000100037fb0&gt;] die+0x250/0x320
                                sp=a000000100bcb930 bsp=a000000100bc4ea0
 [&lt;a00000010005e5f0&gt;] ia64_do_page_fault+0x8d0/0xa20
                                sp=a000000100bcb950 bsp=a000000100bc4e50
 [&lt;a00000010000caa0&gt;] ia64_leave_kernel+0x0/0x290
                                sp=a000000100bcb9e0 bsp=a000000100bc4e50
 [&lt;a0000001000e1410&gt;] __do_IRQ+0x370/0x3e0
                                sp=a000000100bcbbb0 bsp=a000000100bc4df0
 [&lt;a000000100011f50&gt;] ia64_handle_irq+0x170/0x220
                                sp=a000000100bcbbb0 bsp=a000000100bc4dc0
 [&lt;a00000010000caa0&gt;] ia64_leave_kernel+0x0/0x290
                                sp=a000000100bcbbb0 bsp=a000000100bc4dc0
 [&lt;a000000100012390&gt;] ia64_pal_call_static+0x90/0xc0
                                sp=a000000100bcbd80 bsp=a000000100bc4d78
 [&lt;a000000100015630&gt;] default_idle+0x90/0x160
                                sp=a000000100bcbd80 bsp=a000000100bc4d58
 [&lt;a000000100014290&gt;] cpu_idle+0x1f0/0x440
                                sp=a000000100bcbe20 bsp=a000000100bc4d18
 [&lt;a000000100009980&gt;] rest_init+0xc0/0xe0
                                sp=a000000100bcbe20 bsp=a000000100bc4d00
 [&lt;a0000001009f8ea0&gt;] start_kernel+0x6a0/0x6c0
                                sp=a000000100bcbe20 bsp=a000000100bc4ca0
 [&lt;a0000001000089f0&gt;] __end_ivt_text+0x6d0/0x6f0
                                sp=a000000100bcbe30 bsp=a000000100bc4c00
 &lt;0&gt;Kernel panic - not syncing: Aiee, killing interrupt handler!

The root cause is that some irq_chip variables, especially ia64_msi_chip,
initiate their memeber end to point to NULL. __do_IRQ doesn't check
if irq_chip-&gt;end is null and just calls it after processing the interrupt.

As irq_chip-&gt;end is called at many places, so I fix it by reinitiating
irq_chip-&gt;end to dummy_irq_chip.end, e.g., a noop function.

Signed-off-by: Zhang Yanmin &lt;yanmin.zhang@intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I got an oops when booting 2.6.19-rc5-mm1 on my ia64 machine.

Below is the log.

Oops 11012296146944 [1]
Modules linked in: binfmt_misc dm_mirror dm_multipath dm_mod thermal processor f
an container button sg eepro100 e100 mii

Pid: 0, CPU 0, comm:              swapper
psr : 0000121008022038 ifs : 800000000000040b ip  : [&lt;a0000001000e1411&gt;]    Not
tainted
ip is at __do_IRQ+0x371/0x3e0
unat: 0000000000000000 pfs : 000000000000040b rsc : 0000000000000003
rnat: 656960155aa56aa5 bsps: a00000010058b890 pr  : 656960155aa55a65
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f
csd : 0000000000000000 ssd : 0000000000000000
b0  : a0000001000e1390 b6  : a0000001005beac0 b7  : e00000007f01aa00
f6  : 000000000000000000000 f7  : 0ffe69090000000000000
f8  : 1000a9090000000000000 f9  : 0ffff8000000000000000
f10 : 1000a908ffffff6f70000 f11 : 1003e0000000000000909
r1  : a000000100fbbff0 r2  : 0000000000010002 r3  : 0000000000010001
r8  : fffffffffffbffff r9  : a000000100bd8060 r10 : a000000100dd83b8
r11 : fffffffffffeffff r12 : a000000100bcbbb0 r13 : a000000100bc4000
r14 : 0000000000010000 r15 : 0000000000010000 r16 : a000000100c01aa8
r17 : a000000100d2c350 r18 : 0000000000000000 r19 : a000000100d2c300
r20 : a000000100c01a88 r21 : 0000000080010100 r22 : a000000100c01ac0
r23 : a0000001000108e0 r24 : e000000477980004 r25 : 0000000000000000
r26 : 0000000000000000 r27 : e00000000913400c r28 : e0000004799ee51c
r29 : e0000004778b87f0 r30 : a000000100d2c300 r31 : a00000010005c7e0

Call Trace:
 [&lt;a000000100014600&gt;] show_stack+0x40/0xa0
                                sp=a000000100bcb760 bsp=a000000100bc4f40
 [&lt;a000000100014f00&gt;] show_regs+0x840/0x880
                                sp=a000000100bcb930 bsp=a000000100bc4ee8
 [&lt;a000000100037fb0&gt;] die+0x250/0x320
                                sp=a000000100bcb930 bsp=a000000100bc4ea0
 [&lt;a00000010005e5f0&gt;] ia64_do_page_fault+0x8d0/0xa20
                                sp=a000000100bcb950 bsp=a000000100bc4e50
 [&lt;a00000010000caa0&gt;] ia64_leave_kernel+0x0/0x290
                                sp=a000000100bcb9e0 bsp=a000000100bc4e50
 [&lt;a0000001000e1410&gt;] __do_IRQ+0x370/0x3e0
                                sp=a000000100bcbbb0 bsp=a000000100bc4df0
 [&lt;a000000100011f50&gt;] ia64_handle_irq+0x170/0x220
                                sp=a000000100bcbbb0 bsp=a000000100bc4dc0
 [&lt;a00000010000caa0&gt;] ia64_leave_kernel+0x0/0x290
                                sp=a000000100bcbbb0 bsp=a000000100bc4dc0
 [&lt;a000000100012390&gt;] ia64_pal_call_static+0x90/0xc0
                                sp=a000000100bcbd80 bsp=a000000100bc4d78
 [&lt;a000000100015630&gt;] default_idle+0x90/0x160
                                sp=a000000100bcbd80 bsp=a000000100bc4d58
 [&lt;a000000100014290&gt;] cpu_idle+0x1f0/0x440
                                sp=a000000100bcbe20 bsp=a000000100bc4d18
 [&lt;a000000100009980&gt;] rest_init+0xc0/0xe0
                                sp=a000000100bcbe20 bsp=a000000100bc4d00
 [&lt;a0000001009f8ea0&gt;] start_kernel+0x6a0/0x6c0
                                sp=a000000100bcbe20 bsp=a000000100bc4ca0
 [&lt;a0000001000089f0&gt;] __end_ivt_text+0x6d0/0x6f0
                                sp=a000000100bcbe30 bsp=a000000100bc4c00
 &lt;0&gt;Kernel panic - not syncing: Aiee, killing interrupt handler!

The root cause is that some irq_chip variables, especially ia64_msi_chip,
initiate their memeber end to point to NULL. __do_IRQ doesn't check
if irq_chip-&gt;end is null and just calls it after processing the interrupt.

As irq_chip-&gt;end is called at many places, so I fix it by reinitiating
irq_chip-&gt;end to dummy_irq_chip.end, e.g., a noop function.

Signed-off-by: Zhang Yanmin &lt;yanmin.zhang@intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] setup_irq(): better mismatch debugging</title>
<updated>2006-11-14T17:09:26+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-11-14T10:03:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b126b77536186eef69d408eb7959ce7f558f251'/>
<id>8b126b77536186eef69d408eb7959ce7f558f251</id>
<content type='text'>
When we get a mismatch between handlers on the same IRQ, all we get is "IRQ
handler type mismatch for IRQ n".  Let's print the name of the
presently-registered handler with which we got the mismatch.

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we get a mismatch between handlers on the same IRQ, all we get is "IRQ
handler type mismatch for IRQ n".  Let's print the name of the
presently-registered handler with which we got the mismatch.

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Fix misrouted interrupts deadlocks</title>
<updated>2006-11-13T15:40:43+00:00</updated>
<author>
<name>Pavel Emelianov</name>
<email>xemul@openvz.org</email>
</author>
<published>2006-11-10T20:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f72fa707604c015a6625e80f269506032d5430dc'/>
<id>f72fa707604c015a6625e80f269506032d5430dc</id>
<content type='text'>
While testing kernel on machine with "irqpoll" option I've caught such a
lockup:

	__do_IRQ()
	   spin_lock(&amp;desc-&gt;lock);
           desc-&gt;chip-&gt;ack(); /* IRQ is ACKed */
	note_interrupt()
	misrouted_irq()
	handle_IRQ_event()
           if (...)
	      local_irq_enable_in_hardirq();
	/* interrupts are enabled from now */
	...
	__do_IRQ() /* same IRQ we've started from */
	   spin_lock(&amp;desc-&gt;lock); /* LOCKUP */

Looking at misrouted_irq() code I've found that a potential deadlock like
this can also take place:

1CPU:
__do_IRQ()
   spin_lock(&amp;desc-&gt;lock); /* irq = A */
misrouted_irq()
   for (i = 1; i &lt; NR_IRQS; i++) {
      spin_lock(&amp;desc-&gt;lock); /* irq = B */
      if (desc-&gt;status &amp; IRQ_INPROGRESS) {

2CPU:
__do_IRQ()
   spin_lock(&amp;desc-&gt;lock); /* irq = B */
misrouted_irq()
   for (i = 1; i &lt; NR_IRQS; i++) {
      spin_lock(&amp;desc-&gt;lock); /* irq = A */
      if (desc-&gt;status &amp; IRQ_INPROGRESS) {

As the second lock on both CPUs is taken before checking that this irq is
being handled in another processor this may cause a deadlock.  This issue
is only theoretical.

I propose the attached patch to fix booth problems: when trying to handle
misrouted IRQ active desc-&gt;lock may be unlocked.

Acked-by: Ingo Molnar &lt;mingo@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While testing kernel on machine with "irqpoll" option I've caught such a
lockup:

	__do_IRQ()
	   spin_lock(&amp;desc-&gt;lock);
           desc-&gt;chip-&gt;ack(); /* IRQ is ACKed */
	note_interrupt()
	misrouted_irq()
	handle_IRQ_event()
           if (...)
	      local_irq_enable_in_hardirq();
	/* interrupts are enabled from now */
	...
	__do_IRQ() /* same IRQ we've started from */
	   spin_lock(&amp;desc-&gt;lock); /* LOCKUP */

Looking at misrouted_irq() code I've found that a potential deadlock like
this can also take place:

1CPU:
__do_IRQ()
   spin_lock(&amp;desc-&gt;lock); /* irq = A */
misrouted_irq()
   for (i = 1; i &lt; NR_IRQS; i++) {
      spin_lock(&amp;desc-&gt;lock); /* irq = B */
      if (desc-&gt;status &amp; IRQ_INPROGRESS) {

2CPU:
__do_IRQ()
   spin_lock(&amp;desc-&gt;lock); /* irq = B */
misrouted_irq()
   for (i = 1; i &lt; NR_IRQS; i++) {
      spin_lock(&amp;desc-&gt;lock); /* irq = A */
      if (desc-&gt;status &amp; IRQ_INPROGRESS) {

As the second lock on both CPUs is taken before checking that this irq is
being handled in another processor this may cause a deadlock.  This issue
is only theoretical.

I propose the attached patch to fix booth problems: when trying to handle
misrouted IRQ active desc-&gt;lock may be unlocked.

Acked-by: Ingo Molnar &lt;mingo@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
