[PATCH] tty: serial: samsung_tty: remove spinlock flags in interrupt handlers

Johan Hovold johan at kernel.org
Fri Mar 19 15:05:28 GMT 2021


On Fri, Mar 19, 2021 at 12:09:34PM +0200, Andy Shevchenko wrote:
> On Fri, Mar 19, 2021 at 10:09 AM Johan Hovold <johan at kernel.org> wrote:

> > > I think it is almost always wrong to call spin_lock_irqsave in
> > > hardirq.
> >
> > Again, no. It's even been a requirement due to "threadirqs" in some
> > cases (e.g. hrtimers) up until now (or rather until the above patch is
> > in mainline).
> 
> By the way, a good question Imre (Cc'ed) and I have discussed is the
> in-kernel documentation, i.e.
> https://www.kernel.org/doc/html/latest/kernel-hacking/locking.html.
> Should it be adjusted to reality?

Once forced threading disables interrupts (as it should have all along)
we don't need to worry about this anymore. But yeah, otherwise it should
be documented.

Johan



More information about the linux-arm-kernel mailing list