Re: [PATCH] irqchip/gic-v3-its: Don't try to move a disabled irq

From: Marc Zyngier
Date: Wed Jun 03 2020 - 11:16:52 EST


On 2020-06-02 19:47, Saidi, Ali wrote:

[...]

Looks like the x86 apic set_affinity call explicitly checks for if
itâs activated in the managed case which makes sense given the code
Ben posted above:
/*
* Core code can call here for inactive interrupts. For inactive
* interrupts which use managed or reservation mode there is no
* point in going through the vector assignment right now as the
* activation will assign a vector which fits the destination
* cpumask. Let the core code store the destination mask and be
* done with it.
*/
if (!irqd_is_activated(irqd) &&
(apicd->is_managed || apicd->can_reserve))

My original patch should certain check activated and not disabled.
With that do you still have reservations Marc?

I'd still prefer it if we could do something in core code, rather
than spreading these checks in the individual drivers. If we can't,
fair enough. But it feels like the core set_affinity function could
just do the same thing in a single place (although the started vs
activated is yet another piece of the puzzle I didn't consider,
and the ITS doesn't need the "can_reserve" thing).

Thanks,

M.
--
Jazz is not dead. It just smells funny...