Re: [PATCH v4 2/2] irq/irq_sim: simplify the API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wt., 12 maj 2020 o 17:37 Marc Zyngier <maz@xxxxxxxxxx> napisał(a):
>
> > - */
> > -int irq_sim_irqnum(struct irq_sim *sim, unsigned int offset)
> > -{
> > -     return sim->irqs[offset].irqnum;
> > +     irq_ctx = irq_data_get_irq_chip_data(irqd);
> > +
> > +     if (irq_ctx->enabled) {
> > +             set_bit(irqd_to_hwirq(irqd), irq_ctx->work_ctx->pending);
> > +             irq_work_queue(&irq_ctx->work_ctx->work);
> > +     }
> >  }
> > -EXPORT_SYMBOL_GPL(irq_sim_irqnum);
> > +EXPORT_SYMBOL_GPL(irq_sim_fire);
>
> Rather than using an ad-hoc API to queue an interrupt, why don't you
> actually implement the interface that already exists for this at
> the irqchip level (irq_set_irqchip_state, which allows the pending
> state to be set)?
>

Yes, this is great, thanks for bringing this to my attention. I can
drop another function from the API.

Bart




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux