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

From: Johan Hovold
Date: Fri Mar 19 2021 - 11:06:02 EST


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@xxxxxxxxxx> 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