Thread (11 messages) 11 messages, 3 authors, 2020-10-07

Re: [PATCH v2 1/4] genirq/irqdomain: Allow partial trimming of irq_data hierarchy

From: Thomas Gleixner <hidden>
Date: 2020-10-07 12:55:01
Also in: linux-tegra, lkml

On Wed, Oct 07 2020 at 09:53, Marc Zyngier wrote:
On 2020-10-07 09:05, Marc Zyngier wrote:
quoted
On 2020-10-06 21:39, Thomas Gleixner wrote:
quoted
This is butt ugly, really. Especially the use case where the tegra PMC
domain removes itself from the hierarchy from .alloc()
I don't disagree at all. It is both horrible and dangerous.

My preference would have been to split the PMC domain into discrete
domains, each one having having its own depth. But that's incredibly
hard to express in DT, and would break the combination of old/new
DT and kernel.
Moo.
quoted
quoted
That said, I don't have a better idea either. Sigh...
A (very minor) improvement would be to turn the trim call in the PMC
driver into a flag set in the first invalid irq_data structure, and
let __irq_domain_alloc_irqs() do the dirty work.

Still crap, but at least would prevent some form of abuse. Thoughts?
Actually, I wonder whether we can have a more general approach:

A partial hierarchy that doesn't have an irq_data->chip pointer
populated cannot be valid. So I wonder if the least ugly thing to do
is to just drop any messing about in the PMC driver, and instead to
let __irq_domain_alloc_irqs() do the culling, always, by looking for a
NULL pointer in irq_data->chip.

Not any less ugly, but at least doesn't need any driver intervention.
I like that approach.

Thanks,

        tglx

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help