powerpc/xive: Define xive_native_alloc_irq_on_chip()
This function allocates IRQ on a specific chip. VAS needs per chip IRQ allocation and will have IRQ handler per VAS instance. Signed-off-by: Haren Myneni <haren@linux.ibm.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1587016720.2275.1047.camel@hbabu-laptop
This commit is contained in:

committed by
Michael Ellerman

parent
ae83d0b416
commit
8d0ea29db5
@@ -280,12 +280,12 @@ static int xive_native_get_ipi(unsigned int cpu, struct xive_cpu *xc)
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
u32 xive_native_alloc_irq(void)
|
||||
u32 xive_native_alloc_irq_on_chip(u32 chip_id)
|
||||
{
|
||||
s64 rc;
|
||||
|
||||
for (;;) {
|
||||
rc = opal_xive_allocate_irq(OPAL_XIVE_ANY_CHIP);
|
||||
rc = opal_xive_allocate_irq(chip_id);
|
||||
if (rc != OPAL_BUSY)
|
||||
break;
|
||||
msleep(OPAL_BUSY_DELAY_MS);
|
||||
@@ -294,7 +294,7 @@ u32 xive_native_alloc_irq(void)
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xive_native_alloc_irq);
|
||||
EXPORT_SYMBOL_GPL(xive_native_alloc_irq_on_chip);
|
||||
|
||||
void xive_native_free_irq(u32 irq)
|
||||
{
|
||||
|
Reference in New Issue
Block a user