[PATCH] irqchip/sifive-plic: use hartid as context_id in OF to fix AMP conflicts
Thomas Gleixner
tglx at linutronix.de
Mon Oct 20 10:44:55 PDT 2025
On Mon, Oct 20 2025 at 11:49, Troy Mitchell wrote:
> In asymmetric multi-processing (AMP) scenarios, the original PLIC
> driver used the context loop index 'i' as context_id for OF (device
Which original driver and when did it stop to use the context loop index?
> tree) platforms. This caused multiple contexts from different harts
> (e.g., core0 and core4) to share the same enable_base, leading to
> conflicts when initializing the PLIC.
When did it stop to cause the issues? And if the issues have been
already resolved, what is this patch about?
> This patch resolves enable_base conflicts on AMP platforms while
# git grep 'This patch' Documentation/process/
> maintaining SMP/UP behavior.
There is zero explanation what this patch does to resolve the issue.
See also:
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#changelog
>
> if (is_of_node(fwnode)) {
> - context_id = i;
> + context_id = hartid * 2 + i % 2;
This is incomprehensible and will cause head scratching 6 weeks down the
road. This needs a proper comment with an explanation what this is
about and why it is correct under all circumstances.
Thanks,
tglx
More information about the linux-riscv
mailing list