Lines Matching full:mpic

11 #include <asm/mpic.h>
16 #include <sysdev/mpic.h>
18 void mpic_msi_reserve_hwirq(struct mpic *mpic, irq_hw_number_t hwirq) in mpic_msi_reserve_hwirq() argument
20 /* The mpic calls this even when there is no allocator setup */ in mpic_msi_reserve_hwirq()
21 if (!mpic->msi_bitmap.bitmap) in mpic_msi_reserve_hwirq()
24 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq); in mpic_msi_reserve_hwirq()
28 static int __init mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) in mpic_msi_reserve_u3_hwirqs() argument
31 const struct irq_domain_ops *ops = mpic->irqhost->ops; in mpic_msi_reserve_u3_hwirqs()
36 pr_debug("mpic: found U3, guessing msi allocator setup\n"); in mpic_msi_reserve_u3_hwirqs()
45 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); in mpic_msi_reserve_u3_hwirqs()
48 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); in mpic_msi_reserve_u3_hwirqs()
51 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); in mpic_msi_reserve_u3_hwirqs()
53 for (i = 124; i < mpic->num_sources; i++) in mpic_msi_reserve_u3_hwirqs()
54 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); in mpic_msi_reserve_u3_hwirqs()
59 pr_debug("mpic: mapping hwirqs for %pOF\n", np); in mpic_msi_reserve_u3_hwirqs()
63 ops->xlate(mpic->irqhost, NULL, oirq.args, in mpic_msi_reserve_u3_hwirqs()
65 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq); in mpic_msi_reserve_u3_hwirqs()
72 static int __init mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) in mpic_msi_reserve_u3_hwirqs() argument
78 int __init mpic_msi_init_allocator(struct mpic *mpic) in mpic_msi_init_allocator() argument
82 rc = msi_bitmap_alloc(&mpic->msi_bitmap, mpic->num_sources, in mpic_msi_init_allocator()
83 irq_domain_get_of_node(mpic->irqhost)); in mpic_msi_init_allocator()
87 rc = msi_bitmap_reserve_dt_hwirqs(&mpic->msi_bitmap); in mpic_msi_init_allocator()
89 if (mpic->flags & MPIC_U3_HT_IRQS) in mpic_msi_init_allocator()
90 rc = mpic_msi_reserve_u3_hwirqs(mpic); in mpic_msi_init_allocator()
93 msi_bitmap_free(&mpic->msi_bitmap); in mpic_msi_init_allocator()