Re: [sodaville] [PATCH 10/15] x86/ioapic: Add OF bindings for IO-APIC

From: Sebastian Andrzej Siewior
Date: Thu Jan 13 2011 - 05:39:12 EST


* H. Peter Anvin | 2011-01-12 09:19:53 [-0800]:

>On 01/12/2011 09:07 AM, Sebastian Andrzej Siewior wrote:
>>>
>>> I'm confused here. Are there multiple ioapic's described by a single
>>> device tree node?
>
>That's normal multiple IOAPIC behavior (and multiple IOAPICs is a common
>thing), but why use the same device tree node for both?

I'm sorry, I miss understood Grant's question. The two io apics in the
system are described by two nodes. ioapic_add_ofnode() is called for one
node:

> + for (i = 0; i < nr_ioapics; i++) {
> + if (r.start == mp_ioapics[i].apicaddr) {
> + struct irq_domain *id;
> +
> + mp_of_ioapic[i].node = np;
> + id = kzalloc(sizeof(*id), GFP_KERNEL);
> + BUG_ON(!id);
> + id->controller = np;
> + id->xlate = ioapic_xlate;
> + id->priv = (void *)i;
> + add_interrupt_host(id);
> + return;
> + }

and once it matches the previously registered io apic it calls
add_interrupt_host() on it and returns. x86_add_irq_domains() calls it
for every io apic node so it calls add_interrupt_host() twice.

> -hpa

Sebastian
--
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/