[PATCH v4 01/15] genirq/msi: Silence set affinity failed warning

Damien Le Moal dlemoal at kernel.org
Tue Jul 23 15:54:47 PDT 2024


On 7/23/24 10:27 PM, Marek Vasut wrote:
> Various PCIe controllers that mux MSIs onto single IRQ line produce these
> "IRQ%d: set affinity failed" warnings when entering suspend. This has been
> discussed before [1] [2] and an example test case is included at the end
> of this commit message.
> 
> Controller drivers which create MSI IRQ domain with MSI_FLAG_USE_DEF_CHIP_OPS
> flag set and which do not override the .irq_set_affinity irqchip callback get
> assigned default .irq_set_affinity = msi_domain_set_affinity() callback. That
> is not desired on controllers where it is not possible to set affinity of each
> MSI IRQ line to a specific CPU core due to hardware limitation.
> 
> Introduce dedicated flag MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity
> unset in case the controller driver did not assign the callback. This way, the
> migrate_one_irq() code in cpuhotplug.c can exit right away, without printing
> the aforementioned warning. The .irq_set_affinity implementations which only
> return -EINVAL can be removed from multiple controller drivers.
> 
> ```
> $ grep 25 /proc/interrupts
>  25:   0 0 0 0 0 0 0 0   PCIe MSI   0   Edge   PCIe PME
> 
> $ echo core > /sys/power/pm_test ; echo mem > /sys/power/state
> ...
> Disabling non-boot CPUs ...
> IRQ25: set affinity failed(-22). <---------- This is being silenced here
> psci: CPU7 killed (polled 4 ms)
> ...
> ```
> 
> [1] https://lore.kernel.org/all/d4a6eea3c5e33a3a4056885419df95a7@kernel.org/
> [2] https://lore.kernel.org/all/5f4947b18bf381615a37aa81c2242477@kernel.org/
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>

Looks good to me.

Reviewed-by: Damien Le Moal <dlemoal at kernel.org>

-- 
Damien Le Moal
Western Digital Research




More information about the Linux-mediatek mailing list