Sergey Bugaev, le mar. 10 déc. 2024 15:24:02 +0300, a ecrit: > On Tue, Dec 10, 2024 at 3:19 PM Samuel Thibault <samuel.thiba...@gnu.org> > wrote: > > Sergey Bugaev, le mar. 10 déc. 2024 14:57:05 +0300, a ecrit: > > > @@ -103,11 +105,15 @@ queue_intr (struct irqdev *dev, int id, user_intr_t > > > *e) > > > * disabled. Level-triggered interrupts would keep raising otherwise. > > > */ > > > __disable_irq (dev->irq[id]); > > > > > > - spl_t s = splhigh (); > > > +#ifdef LINUX_DEV > > > + spl_t s = simple_lock_irq(&intr_lock); > > > +#endif > > > > Why only ifdef LINUX_DEV? AIUI We do want to always lock. > > As said, I'm not sure if that's the correct thing. But the reasoning > here has been that deliver_user_intr (which is what calls queue_intr) > is called from two different contexts:
Ah, right. This definitely deserves a comment saying that locking is already done in user_irq_handler in the !LINUX_DEV case. Samuel