Re: [PATCH 2/2] ARM: bcm: support more than two CPUs on BCMBCA

From: Linus Walleij

Date: Tue Dec 01 2026 - 10:26:23 EST


On Tue, Dec 1, 2026 at 3:49 PM Jie Feng <hjf3108@xxxxxxxxx> wrote:

> > Yes? And it wakes up the secondary core targeted by that IPI,
> > right?

> And all the other secondary cores too. arch_send_wakeup_ipi_mask(CPU1)
> wakes up CPU2 and CPU3.

Aha OK that's unfortunate :(

> I tested what you had suggested, write
> secondary_startup_arm into the mailbox before the IPI and the router
> crashed on boot up.
> The reason is because irq-gic's gic_cpu_map is 0xff, so IPIs get sent
> to all CPUs. I am not sure how to solve this without a holding pen, or
> bypassing irq-gic directly writing to the GIC registers.

Actually I think it is 0xfe when we get here.
irq-gic.c initializes each gic_cpu_map[] entry to 0xff, but CPU0 then
discovers its own interface bit from the banked GICD_ITARGETSR0–7
registers and clears it from every other entry.

But yes it has the same effect that IPIs from CPU0 will get broadcast
to CPU1, 2, 3. The idea is for CPU1 to mask itself from the mask
once it starts, and if the IPI has the effect of sending a broadcast
to all three secondary CPUs this causes problems of course :/

We ask Marc Zyngier what is going on here and how
to fix it.

Marc is there a good way to direct IPIs to a specific CPU for
secondary CPU startup in the arm,cortex-a7-gic? Or do we need
to use the "pen" method of putting the three CPUs to a spin wait?

Yours,
Linus Walleij