Hello, 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 free_irq. 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. Samuel
