[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 15/16] xen/riscv: implement setup_irq()
On 5/15/25 11:57 AM, Jan Beulich wrote:
On 06.05.2025 18:51, Oleksii Kurochko wrote:@@ -58,6 +59,89 @@ int platform_get_irq(const struct dt_device_node *device, int index) return dt_irq.irq; } +static int _setup_irq(struct irq_desc *desc, unsigned int irqflags, + struct irqaction *new) +{ + bool shared = irqflags & IRQF_SHARED; + + ASSERT(new != NULL); + + /* + * Sanity checks: + * - if the IRQ is marked as shared + * - dev_id is not NULL when IRQF_SHARED is set + */ + if ( desc->action != NULL && (!(desc->status & IRQF_SHARED) || !shared) ) + return -EINVAL; + if ( shared && new->dev_id == NULL ) + return -EINVAL; + + if ( shared ) + desc->status |= IRQF_SHARED; + +#ifdef CONFIG_IRQ_HAS_MULTIPLE_ACTION + new->next = desc->action; +#endifDidn't you indicate you'd drop this? To one of replies I wrote that probably something (eg RISC-V's IOMMU) will want to setup multiple handler for the same interrupt. But I'm not sure yet. I can drop for now and return back when it will be really a use case. ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |