lkml.org 
[lkml]   [2020]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 2/2] irq/irq_sim: simplify the API
wt., 12 maj 2020 o 17:37 Marc Zyngier <maz@kernel.org> 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

\
 
 \ /
  Last update: 2020-05-12 19:13    [W:0.061 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site