[Top][All Lists]

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

Re: [PATCH-1] A new irq device interface

From: Samuel Thibault
Subject: Re: [PATCH-1] A new irq device interface
Date: Sun, 2 Aug 2020 23:00:20 +0200
User-agent: NeoMutt/20170609 (1.8.3)


Junling Ma, le sam. 01 août 2020 18:59:58 -0700, a ecrit:
> PATCH 1 is included in this email: it prepares the stage by

Please provide separate patches for each over these. Otherwise this is
all conflated and way more difficult to review.

> 1. Change devicer_user_intr to be a linux interrupt handler. 

Right, this makes sense, but did you actually try it? Check the existing
code twice to realize why it's done that way. Here linux_intr is looking
through the list of actions for an irq. You are making action->handler()
call free_irq itself when the handler should be removed. But then the
loop of linux_intr will have its action pointer undefined since freed by

I agree that we should probably remove some of the "user_intr" pieces of
linux_intr(). But we cannot afford removing the part that checks the
value returned by the handler, otherwise it'll break.

> 2. Make user_intr_t represent a specific interrupt line, so that 
> notifications queue on each line.
> 3. Make struct irqdev store a vector user_intr_t, indexed by interrupt line.

? But then we can't have several userland translators using the same
irq? That'll break.

> 4. The n_unacked counter only increases when successfully delivered an 
> interrupt.

? It is meant to know how many times __disable_irq was called, and thus
how many times we should call __enable_irq if the port dies.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]