On Mon, Sep 5, 2022 at 4:04 PM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > > On Mon, Sep 5, 2022 at 2:54 PM Russell King (Oracle) > <linux@xxxxxxxxxxxxxxx> wrote: > > On Thu, Sep 01, 2022 at 09:03:49PM +0300, Andy Shevchenko wrote: > > > On Thu, Sep 1, 2022 at 5:18 PM Russell King <rmk+kernel@xxxxxxxxxxxxxxx> wrote: > > ... > > > > Usually we want to have handle_bad_irq() handler by default and in > > > ->set_type() we lock a handler depending on the flags. Why is this not > > > the case in this driver? > > > > "lock a handler" ? I guess you mean select a handler. > > Yes, I was a bit confused by API naming (irq_set_handler_locked() was it). > > > I don't see a reason why we couldn't switch between handle_bad_irq() > > and handle_simple_irq(). I would guess (I don't know the implementation > > details of the Apple platform) that the SMC forwards a message when the > > IRQ happens, but I'm guessing that this is well tested on the platform > > with the simple flow handler. > > I have had a real case where it makes quite a difference: > eb441337c714 ("gpio: pca953x: Set IRQ type when handle Intel Galileo Gen 2") > > The missed ->irq_set_type() call shows a bug in the IRQ flow in the > code. This became visible due to the switch to handle_bad_irq() and > was hidden with other default handlers. After this I ask people to use > the default handler to be a "bad" one. > > > Changing it to something else would need > > discussion with the Asahi Linux folk. > > > > -- > With Best Regards, > Andy Shevchenko -- With Best Regards, Andy Shevchenko