Thread (2 messages) 2 messages, 2 authors, 2012-05-31

Re: [PATCH 3/9] ARM: mmp: support DT in irq

From: Chris Ball <hidden>
Date: 2012-05-30 19:38:51
Also in: linux-arm-kernel

Possibly related (same subject, not in this thread)

Hi Haojian,

On Fri, Apr 27 2012, Haojian Zhuang wrote:
Append new interrupt driver that could support both pxa168 and mmp2
silicon. And this driver supports device tree.

Since CONFIG_SPARSE_IRQ is enabled in arch-mmp, irq driver should
handle reserved NR_IRQS_LEGACY in irq domain.

Signed-off-by: Haojian Zhuang <redacted>
This patch (now in mainline) breaks boot on XO-1.75 (MMP2, non-DT).
I hit the error path below:
+	for (i = 1; i < max_icu_nr; i++) {
+		if (irq == icu_data[i].cascade_irq) {
+			domain = icu_data[i].domain;
+			data = (struct icu_chip_data *)domain->host_data;
+			break;
+		}
+	}
+	if (i >= max_icu_nr) {
+		pr_err("Spurious irq %d in MMP INTC\n", irq);
+		return;
+	}
This error path is hit because i=8 and max_icu_nr=8, which is because
we never matched (irq == icu_data[i].cascade_irq) in the for loop above.
This test is outside of a DT path, but cascade_irq appears to only ever
be set *inside* a DT path:
+		icu_data[i].cascade_irq = irq_of_parse_and_map(node, 0);
+		if (!icu_data[i].cascade_irq) {
+			ret = -EINVAL;
+			goto err;
+		}
Did you test non-DT boot with these changes?

Thanks,

- Chris.
-- 
Chris Ball   [off-list ref]   <http://printf.net/>
One Laptop Per Child
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help