lkml.org 
[lkml]   [2022]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4] irqchip/ls-extirq: fix invalid wait context by avoiding to use regmap
Date
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?

Thanks,
Vladimir
\
 
 \ /
  Last update: 2022-10-03 11:49    [W:0.087 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site