On Thu, Feb 16, 2023 at 03:47:44PM +0200, Oded Gabbay wrote:
> On Thu, Feb 16, 2023 at 12:28 PM Stanislaw Gruszka
> wrote:
> >
> > Hi
> >
> > On Sun, Feb 12, 2023 at 10:44:45PM +0200, Oded Gabbay wrote:
> >
> > > irqreturn_t hl_irq_handler_user_interrupt(int irq, void *arg)
> > > +{
> > > +
On Thu, Feb 16, 2023 at 12:39 PM Stanislaw Gruszka
wrote:
>
> On Sun, Feb 12, 2023 at 10:44:45PM +0200, Oded Gabbay wrote:
> > - rc = request_irq(irq, irq_handler, 0, gaudi2_irq_name(i),
> > >user_interrupt[j]);
> > + rc = request_threaded_irq(irq, irq_handler,
> >
On Thu, Feb 16, 2023 at 12:28 PM Stanislaw Gruszka
wrote:
>
> Hi
>
> On Sun, Feb 12, 2023 at 10:44:45PM +0200, Oded Gabbay wrote:
>
> > irqreturn_t hl_irq_handler_user_interrupt(int irq, void *arg)
> > +{
> > + return IRQ_WAKE_THREAD;
> > +}
>
> This is not needed. You can pass NULL to
On Sun, Feb 12, 2023 at 10:44:45PM +0200, Oded Gabbay wrote:
> - rc = request_irq(irq, irq_handler, 0, gaudi2_irq_name(i),
> >user_interrupt[j]);
> + rc = request_threaded_irq(irq, irq_handler,
> hl_irq_user_interrupt_thread_handler,
> +
Hi
On Sun, Feb 12, 2023 at 10:44:45PM +0200, Oded Gabbay wrote:
> irqreturn_t hl_irq_handler_user_interrupt(int irq, void *arg)
> +{
> + return IRQ_WAKE_THREAD;
> +}
This is not needed. You can pass NULL to request_threaded_irq() and
the irq core will use irq_default_primary_handler()
From: Tal Cohen
We prefer not to handle the user interrupt job inside the interrupt
context. Instead, use threaded IRQ to handle the user interrupts.
This will allow to avoid disabling interrupts when the user process
registers for a new event and to avoid long handling inside an
interrupt.