[PATCH 6/9] MPIC MSI allocator
Olof Johansson
olof at lixom.net
Thu Dec 14 05:23:53 EST 2006
On Wed, 13 Dec 2006 21:40:03 +1100 Michael Ellerman <michael at ellerman.id.au> wrote:
> To support MSI on MPIC we need a way to reserve and allocate hardware irq
> numbers, this patch implements an allocator for that. It looks like we'll
> end up with several backends based on the MPIC, so the allocator is attached
> to the struct mpic, not the msi backend.
>
> Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
> +static void mpic_msi_auto_reserve_hwirqs(struct mpic *mpic)
> +{
> + irq_hw_number_t hwirq;
> + struct irq_host_ops *ops = mpic->irqhost->ops;
> + struct device_node *np;
> + int flags, index, i;
> + struct of_irq oirq;
> +
> + /* Reserve source numbers we know are reserved in the HW */
How do we know? Reserved on what HW? Sure looks system/platform
dependent to me.
> + for (i = 0; i < 8; i++)
> + __mpic_msi_reserve_hwirq(mpic, i);
> + for (i = 42; i < 26; i++)
^^^^^^^^^^^^^^^
Is this some sort of check to see if we're awake? :)
> + __mpic_msi_reserve_hwirq(mpic, i);
> + for (i = 100; i < 105; i++)
> + __mpic_msi_reserve_hwirq(mpic, i);
-Olof
More information about the Linuxppc-dev
mailing list