Questions on interrupt vector assignment on MPC8641D
Scott Wood
scottwood at freescale.com
Wed Oct 13 08:21:52 EST 2010
On Tue, 12 Oct 2010 15:55:28 -0500
<david.hagood at gmail.com> wrote:
> I wonder about the next lines:
>
>
> mpic_assign_isu(mpic1, 0, res.start + 0x10000);
>
> /* 48 Internal Interrupts */
> mpic_assign_isu(mpic1, 1, res.start + 0x10200);
> mpic_assign_isu(mpic1, 2, res.start + 0x10400);
> mpic_assign_isu(mpic1, 3, res.start + 0x10600);
>
> /* 16 External interrupts
> * Moving them from [0 - 15] to [64 - 79]
> */
> mpic_assign_isu(mpic1, 4, res.start + 0x10000);
No mainline 86xx boards do that, even in 2.6.26. I suspect you need to
either get rid of the isu stuff altogether, or add a mapping for the
MSI interrupts.
> Looking at the code, and where it appears to be faulting, it looks like
> its in kernel/irq/chip.c:
>
>
> int set_irq_type(unsigned int irq, unsigned int type)
> {
> struct irq_desc *desc;
> unsigned long flags;
> int ret = -ENXIO;
>
> if (irq >= NR_IRQS) {
> printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq);
> return -ENODEV;
> }
>
> desc = irq_desc + irq;
> ------------------------
> if (desc->chip->set_type) {
> spin_lock_irqsave(&desc->lock, flags);
> ret = desc->chip->set_type(irq, type);
> ------------------------
>
>
> spin_unlock_irqrestore(&desc->lock, flags);
> }
> return ret;
> }
>
> My conjecture is that desc->chip isn't set. Is mpic_assign_isu the
> function that does that?
That happens in set_irq_chip_and_handler(), called from mpic_host_map()
-- just a few lines before calling set_irq_type().
The crash is happening somewhere in mpic_set_irq_type():
> NIP [c0016540] mpic_set_irq_type+0x188/0x1c4
-Scott
More information about the Linuxppc-dev
mailing list