Re: irqdomain API: how to set affinity of parent irq of chained irqs?

From: Marek Behún
Date: Mon May 02 2022 - 11:46:16 EST


On Mon, 02 May 2022 10:31:11 +0100
Marc Zyngier <maz@xxxxxxxxxx> wrote:

> On Mon, 02 May 2022 09:21:37 +0100,
> Marek Behún <kabel@xxxxxxxxxx> wrote:
> >
> > Dear Marc, Thomas,
> >
> > we have encountered the following problem that can hopefully be put
> > some light onto: What is the intended way to set affinity (and possibly
> > other irq attributes) of parent IRQ of chained IRQs, when using the
> > irqdomain API?
>
> Simples: you can't. What sense does it make to change the affinity of
> the parent interrupt, given that its fate is tied to *all* of the
> other interrupts that are muxed to it?

Dear Marc,

thank you for your answer. Still:

What about when we want to set the same affinity for all the chained
interrupts?

Example: on Armada 385 there are 4 PCIe controllers. Each controller
has one interrupt from which we trigger chained interrupts. We would
like to configure each controller to trigger interrupt (and thus all
chained interrupts in the domain) on different CPU core.

Moreover we would really like to do this in runtime, through sysfs,
depending on for example whether there are cards plugged in the PCIe
ports.

Maybe there should be some mechanism to allow to change affinity for
whole irqdomain, or something?

Marek