All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Lee Jones <lee.jones@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	"Z.Q. Hou" <zhiqiang.hou@nxp.com>, Biwen Li <biwen.li@nxp.com>,
	Sean Anderson <sean.anderson@seco.com>
Subject: Re: [PATCH v4] irqchip/ls-extirq: fix invalid wait context by avoiding to use regmap
Date: Mon, 03 Oct 2022 16:28:10 +0100	[thread overview]
Message-ID: <864jwlapv9.wl-maz@kernel.org> (raw)
In-Reply-To: <20221003094542.tlh6xoee77akuubn@skbuf>

On Mon, 03 Oct 2022 10:45:43 +0100,
Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> 
> Hi Marc, Arnd,
> 
> On Thu, Aug 18, 2022 at 05:13:09PM +0300, Vladimir Oltean wrote:
> > Hi,
> > 
> > On Thu, Jul 28, 2022 at 05:42:54PM +0300, Vladimir Oltean wrote:
> > > The irqchip->irq_set_type method is called by __irq_set_trigger() under
> > > the desc->lock raw spinlock.
> > > 
> > > The ls-extirq implementation, ls_extirq_irq_set_type(), uses an MMIO
> > > regmap created by of_syscon_register(), which uses plain spinlocks
> > > (the kind that are sleepable on RT).
> > > 
> > > Therefore, this is an invalid locking scheme for which we get a kernel
> > > splat stating just that ("[ BUG: Invalid wait context ]"), because the
> > > context in which the plain spinlock may sleep is atomic due to the raw
> > > spinlock. We need to go raw spinlocks all the way.
> > > 
> > > Make this driver ioremap its INTPCR register on its own, and stop
> > > relying on syscon to provide a regmap. Since the regmap we got from
> > > syscon belonged to the parent and the newly ioremapped region belongs
> > > just to us, the offset to the INTPCR register is now 0, because of the
> > > address translation that takes place through the device tree.
> > > 
> > > One complication, due to the fact that this driver uses IRQCHIP_DECLARE
> > > rather than traditional platform devices with probe and remove methods,
> > > is that we cannot use devres, so we need to implement a full-blown
> > > cleanup procedure on the error path.
> > > 
> > > Fixes: 0dcd9f872769 ("irqchip: Add support for Layerscape external interrupt lines")
> > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > > ---
> > 
> > Just checking in on this patch to make sure it hasn't been forgotten.
> 
> Is there something else I need to do such that this patch gets accepted?

No, it just went under the radar. I would have liked an ack from
Rasmus, but this has been there for long enough.

I'll queue this as a fix for 6.1.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2022-10-03 15:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 14:42 [PATCH v4] irqchip/ls-extirq: fix invalid wait context by avoiding to use regmap Vladimir Oltean
2022-07-28 15:25 ` Sean Anderson
2022-07-28 15:28   ` Vladimir Oltean
2022-07-28 15:43     ` Sean Anderson
2022-07-28 16:19       ` Vladimir Oltean
2022-07-28 16:31         ` Sean Anderson
2022-07-28 17:32       ` Marc Zyngier
2022-08-18 14:13 ` Vladimir Oltean
2022-10-03  9:45   ` Vladimir Oltean
2022-10-03 15:28     ` Marc Zyngier [this message]
2022-10-04  7:52       ` Rasmus Villemoes
2022-10-03 15:35 ` [irqchip: irq/irqchip-fixes] irqchip/ls-extirq: Fix " irqchip-bot for Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864jwlapv9.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=arnd@arndb.de \
    --cc=biwen.li@nxp.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=sean.anderson@seco.com \
    --cc=tglx@linutronix.de \
    --cc=vladimir.oltean@nxp.com \
    --cc=zhiqiang.hou@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.