From: Jie Feng <hjf3108@gmail.com>
To: William Zhang <william.zhang@broadcom.com>
Cc: "Florian Fainelli" <florian.fainelli@broadcom.com>,
"Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Russell King" <linux@armlinux.org.uk>,
"Anand Gore" <anand.gore@broadcom.com>,
"Kursad Oney" <kursad.oney@broadcom.com>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Linus Walleij" <linusw@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: bcm: support more than two CPUs on BCMBCA
Date: Thu, 26 Nov 2026 11:13:56 +0800 [thread overview]
Message-ID: <CABOQOSV5eW5X0_ChXe8MT2tTFPtLTHLuRn520Ya-tUp8MoQTFQ@mail.gmail.com> (raw)
In-Reply-To: <CAHi4H7HVNRnBynR2KLnxr=fpep=jkSBbE1NHvFr5e2DsvSTpjQ@mail.gmail.com>
Hi William,
On Thu, 26 Nov 2026 at 02:48, William Zhang <william.zhang@broadcom.com> wrote:
>
> Hi Ho Jie,
> On Mon, Nov 23, 2026 at 6:22 AM Ho Jie Feng <hjf3108@gmail.com> wrote:
> >
> > BCMBCA Cortex-A7 SoCs can have more than two cores, such as the
> > quad-core BCM6755. Extend the CFE SMP support to all secondary CPUs.
> >
> > CFE parks every secondary CPU on the same mailbox, and the wakeup SGI
> > wakes all offline CPUs at once. Hold them in a pen and release them one
> > at a time.
> >
> > Signed-off-by: Ho Jie Feng <hjf3108@gmail.com>
> > ---
> > arch/arm/mach-bcm/Makefile | 1 +
> > arch/arm/mach-bcm/bcmbca_headsmp.S | 26 +++++++++++++++++
> > arch/arm/mach-bcm/bcmbca_smp.h | 9 ++++++
> > arch/arm/mach-bcm/board_bcmbca.c | 46 ++++++++++++++++++++++++------
> > 4 files changed, 73 insertions(+), 9 deletions(-)
> > create mode 100644 arch/arm/mach-bcm/bcmbca_headsmp.S
> > create mode 100644 arch/arm/mach-bcm/bcmbca_smp.h
> >
> > diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile
> > index fcc4e0174a..c3cd2959bc 100644
> > --- a/arch/arm/mach-bcm/Makefile
> > +++ b/arch/arm/mach-bcm/Makefile
> > @@ -60,4 +60,5 @@ endif
> > ifeq ($(CONFIG_ARCH_BCMBCA),y)
> > obj-y += board_bcmbca.o
> > obj-$(CONFIG_SMP) += bcm63xx_smp.o bcm63xx_pmb.o
> > +obj-$(CONFIG_SMP) += bcmbca_headsmp.o
> > endif
> > diff --git a/arch/arm/mach-bcm/bcmbca_headsmp.S b/arch/arm/mach-bcm/bcmbca_headsmp.S
> > new file mode 100644
> > index 0000000000..3d0d0d97be
> > --- /dev/null
> > +++ b/arch/arm/mach-bcm/bcmbca_headsmp.S
> > @@ -0,0 +1,26 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +/*
> > + * All CPUs will wake up on an SGI. Wait in the holding pen until
> > + * bcmbca_cpu_release matches the MPIDR.
> > + *
> > + * Based on arch/arm/mach-versatile/headsmp.S
> > + */
> > +#include <linux/linkage.h>
> > +#include <asm/assembler.h>
> > +
> > + .arm
> > +ENTRY(bcmbca_secondary_startup)
> > + ARM_BE8(setend be)
> > + THUMB( badr r9, 1f )
> > + THUMB( bx r9 )
> > + THUMB( .thumb )
> > + THUMB(1: )
> > + mrc p15, 0, r0, c0, c0, 5
> > + bic r0, #0xff000000
> > + adr_l r6, bcmbca_cpu_release
> > +pen: ldr r7, [r6]
> > + cmp r7, r0
> > + bne pen
> > +
> It is better to invalidate the L1 cache for the secondary cpus
> regardless of whether the bl does that or not.
If I'm not wrong, this will eventually end up in __v7_ca7mp_setup
which calls do_invalidate_l1?
https://elixir.bootlin.com/linux/v7.4-rc1/source/arch/arm/mm/proc-v7.S#L301
Best regards,
Jie Feng
next prev parent reply other threads:[~2026-11-26 3:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 14:28 [PATCH 0/2] " Ho Jie Feng
2026-11-23 14:21 ` [PATCH 1/2] dt-bindings: arm: cpus: Require cpu-release-addr on bca-smp secondaries Ho Jie Feng
2026-11-23 14:22 ` [PATCH 2/2] ARM: bcm: support more than two CPUs on BCMBCA Ho Jie Feng
2026-11-25 18:47 ` William Zhang
2026-11-26 3:13 ` Jie Feng [this message]
2026-11-25 21:00 ` Linus Walleij
2026-11-26 3:05 ` Jie Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABOQOSV5eW5X0_ChXe8MT2tTFPtLTHLuRn520Ya-tUp8MoQTFQ@mail.gmail.com \
--to=hjf3108@gmail.com \
--cc=anand.gore@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=florian.fainelli@broadcom.com \
--cc=kursad.oney@broadcom.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rafal@milecki.pl \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=william.zhang@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®