Re: [PATCH v3 2/3] genirq: Always limit the affinity to online CPUs

From: Thomas Gleixner
Date: Thu Apr 14 2022 - 06:49:49 EST


On Wed, Apr 13 2022 at 18:26, Marc Zyngier wrote:
> Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> wrote:
>> This patch landed in linux next-20220413 as commit 33de0aa4bae9
>> ("genirq: Always limit the affinity to online CPUs"). Unfortunately it
>> breaks booting of most ARM 32bit Samsung Exynos based boards.
>>
>> I don't see anything specific in the log, though. Booting just hangs at
>> some point. The only Samsung Exynos boards that boot properly are those
>> Exynos4412 based.
>>
>> I assume that this is related to the Multi Core Timer IRQ configuration
>> specific for that SoCs. Exynos4412 uses PPI interrupts, while all other
>> Exynos SoCs have separate IRQ lines for each CPU.
>
> Can you also check that with the patch applied, it is this path that
> is taken and that it is the timer interrupts that get rejected? If
> that's the case, can you put a dump_stack() here and give me that
> stack trace? The use of irq_force_affinity() in the driver looks
> suspicious...

It's pretty clear what happens.

secondary_start_kernel()
notify_cpu_starting(cpu);
exynos4_mct_starting_cpu()
irq_force_affinity() -> fail

set_cpu_online(cpu, true);

Thanks,

tglx