[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200430101322.420e4052@why>
Date: Thu, 30 Apr 2020 10:13:22 +0100
From: Marc Zyngier <maz@...nel.org>
To: Sumit Garg <sumit.garg@...aro.org>
Cc: Daniel Thompson <daniel.thompson@...aro.org>,
Jason Cooper <jason@...edaemon.net>,
Catalin Marinas <catalin.marinas@....com>,
Douglas Anderson <dianders@...omium.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Jason Wessel <jason.wessel@...driver.com>,
kgdb-bugreport@...ts.sourceforge.net,
Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <will@...nel.org>, julien.thierry.kdev@...il.com
Subject: Re: [RFC Patch v1 2/4] irqchip/gic-v3: Add support to handle SGI as
pseudo NMI
On Thu, 30 Apr 2020 12:50:28 +0530
Sumit Garg <sumit.garg@...aro.org> wrote:
> Hi Marc,
>
> On Wed, 29 Apr 2020 at 13:53, Marc Zyngier <maz@...nel.org> wrote:
[...]
> > What I would like is for the arch code to request these interrupts as
> > normal interrupts, for which there is one problem to solve: how do you
> > find out about the Linux IRQ number for a given IPI. Or rather, how
> > do you get rid of the requirement to have IPI numbers at all and just
> > say "give me a per-cpu interrupt that I can use as an IPI, and by the
> > way here's the handler you can call".
>
> I think what you are looking for here is something that could be
> sufficed via enabling "CONFIG_GENERIC_IRQ_IPI" framework for arm64/arm
> architectures. It's currently used for mips architecture. Looking at
> its implementation, I think it should be possible to hook up SGIs
> under new IPI irq_domain for GICv2/v3.
>
> So with this framework we should be able to dynamically allocate IPIs
> and use common APIs such as request_irq()/request_nmi() to tell IPI
> specific handlers.
>
> If this approach looks sane to you then I can start working on a PoC
> implementation for arm64.
I can't say I'm keen. This IPI framework doesn't really work for the
GIC:
- it requires a separate irqdomain to be able to guarantee that you
allocate the hwirq in the SGI range. What is the point?
- it creates yet another level of indirection on IPI injection
This framework was created to deal with two cases:
- systems that can't represent their IPI with a single hwirq spanning
all the CPUs
- "accelerator cores" that don't run Linux
The GIC architecture avoids the first point, and I don't even want to
think of the second one.
Also, it doesn't solve the initial problem, which is to bootstrap the
whole thing. The IPI framework relies on an irqdomain to be created the
first place. This would mean teaching the arch code about the
intricacies of irqdomains, FW nodes and other terrible things. All
things which are better hidden in the GIC drivers (not to mention the
other horror stories that are the RPi-2/3 irqchip and the Huawei GIC
knock-off).
What I have in mind is to replace the set_smp_cross_call() with
something that passes the required set of information (interrupt range,
at the very least). The only thing that I plan to reuse from the IPI
framework is the chip->ipi_send_mask() callback.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists