[RFC] [patch 5/6] powerpc 2.6.20-rt8: fix a boot error for handle_percpu_irq

From: Tsutomu OWA
Date: Tue Mar 06 2007 - 20:46:29 EST



To fix the following boot time error by removing ack member added by
the rt patch.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processor 1 found.
Brought up 2 CPUs
------------[ cut here ]------------
kernel BUG at arch/powerpc/platforms/cell/interrupt.c:86!
pu 0x1: Vector: 700 (Program Check) at [c00000000fff3c80]
pc: c000000000033f9c: .iic_eoi+0x58/0x64
lr: c00000000009add8: .handle_percpu_irq+0xd4/0xf4
sp: c00000000fff3f00
msr: 9000000000021032
current = 0xc000000000fee040
paca = 0xc000000000509e80
pid = 0, comm = swapper
kernel BUG at arch/powerpc/platforms/cell/interrupt.c:86!
enter ? for help
[link register ] c00000000009add8 .handle_percpu_irq+0xd4/0xf4
[c00000000fff3f00] c00000000009ada8 .handle_percpu_irq+0xa4/0xf4 (unreliable)
[c00000000fff3f90] c000000000023bb8 .call_handle_irq+0x1c/0x2c
[c000000000ff7950] c00000000000c910 .do_IRQ+0xf8/0x1b8
[c000000000ff79f0] c000000000034f34 .cbe_system_reset_exception+0x74/0xb4
[c000000000ff7a70] c000000000022610 .system_reset_exception+0x40/0xe0
[c000000000ff7af0] c000000000003378 system_reset_common+0xf8/0x100
--- Exception: 100 (System Reset) at c000000000035008 .cbe_power_save+0x94/0xb0
[c000000000ff7e70] c000000000012030 .cpu_idle+0xc8/0x144
[c000000000ff7f00] c000000000026894 .start_secondary+0x150/0x174
[c000000000ff7f90] c000000000008364 .start_secondary_prolog+0xc/0x10
1:mon>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I found a pile of e-mail started by Sergei Shtylyov on linuxppc-dev regarding this.
Subject: [PATCH] 2.6.18-rt7: PowerPC: fix breakage in threaded fasteoi type IRQ handlers
From: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Date: Sun, 19 Nov 2006 22:43:34 +0300

Though I don't quite get the conclusion, the code does not work at least
on celleb when handle_percpu_irq is applied. Since the handle_percpu_irq calls
both .ask and .eoi and when ask is set to iic_eoi, then iic_eoi() is called twice
for one interrupt. It hits BUG_ON(iic->eoi_ptr < 0)!

Anthor workaround could be to add one more irq_chip structure for handle_percpu_irq
which does not have ack member...

Any comments?

Signed-off-by: Tsutomu Owa <tsutomu.owa@xxxxxxxxxxxxx>
-- owa

diff -rup linux-rt8/arch/powerpc/platforms/cell/interrupt.c rt/arch/powerpc/platforms/cell/interrupt.c
--- linux-rt8/arch/powerpc/platforms/cell/interrupt.c 2007-02-20 14:30:38.000000000 +0900
+++ rt/arch/powerpc/platforms/cell/interrupt.c 2007-03-02 18:48:52.000000000 +0900
@@ -90,7 +90,6 @@ static struct irq_chip iic_chip = {
.typename = " CELL-IIC ",
.mask = iic_mask,
.unmask = iic_unmask,
- .ack = iic_eoi,
.eoi = iic_eoi,
};


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/