Re: AW: [PATCH v2 2/2] irqchip/irq-realtek-rtl: Add multicore support
From: Thomas Gleixner
Date: Thu Jun 04 2026 - 15:08:27 EST
On Thu, Jun 04 2026 at 20:22, Markus Stockhausen wrote:
>> Von: Thomas Gleixner <tglx@xxxxxxxxxx>
>> Gesendet: Donnerstag, 4. Juni 2026 17:59
>> An: Markus Stockhausen <markus.stockhausen@xxxxxx>;
> linux-kernel@xxxxxxxxxxxxxxx
>> Cc: Markus Stockhausen <markus.stockhausen@xxxxxx>
>> Betreff: Re: [PATCH v2 2/2] irqchip/irq-realtek-rtl: Add multicore support
>> ...
>> With that fixed you can drop this whole realtek_ictl_cpu_configurable
>> dance as the core will never set a non-present CPU in the destination
>> mask. It even guarantees that the CPUs in the mask are online unless
>> @force = true. The latter is only for scenarios where pseudo per CPU
>> interrupts have to be affined before a CPU goes online, so irrelevant
>> for your use case.
>
> Thanks für the explanation. That paved the way for a much
> simpler v3 series. BTW - We need those pseudo per CPU interrupts.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/irqchip/irq-mips-gic.c?id=2250db8628a0d8293ad2e0671138b848a185fba1
Fine, but that code makes no sense:
if (force)
cpu = cpumask_first(cpumask);
else
cpu = cpumask_first_and(cpumask, cpu_online_mask);
because in the !force case @cpumask is guaranteed to be not empty and a
subset of cpu_online mask.
I missed that back then probably because the long since then fixed
original core code could supply arbitrary masks to the drivers and my
memory still stuck to this scheme.
Thanks,
tglx