From: Kohei Enju <enju.kohei@fujitsu.com>
To: Marc Zyngier <maz@kernel.org>
Cc: Tomohiro Misono <misono.tomohiro@fujitsu.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Thomas Gleixner <tglx@kernel.org>, Radu Rendec <radu@rendec.net>,
Oliver Upton <oupton@kernel.org>,
Fuad Tabba <fuad.tabba@linux.dev>,
Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-perf-users@vger.kernel.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH v2 4/4] irqchip/gicv3: Add workaround for FUJITSU-MONAKA erratum E#030003
Date: Tue, 20 Oct 2026 16:20:12 +0900 [thread overview]
Message-ID: <atcTtojPd1BSS8fr@FCCLS0092175.localdomain> (raw)
In-Reply-To: <87wlrg8qc7.wl-maz@kernel.org>
On 10/17 13:27, Marc Zyngier wrote:
> On Fri, 16 Oct 2026 11:00:48 +0100,
> Tomohiro Misono <misono.tomohiro@fujitsu.com> wrote:
> >
> > From: Kohei Enju <enju.kohei@fujitsu.com>
> >
> > On affected FUJITSU-MONAKA CPUs, the erratum may occur when an SGI is
> > generated by writing to ICC_SGI0R_EL1, ICC_SGI1R_EL1, or ICC_ASGI1R_EL1,
> > if the operation races with CPU interface processing triggered by the
> > arrival of a higher-priority interrupt, an update to a pending
> > interrupt, or a transition of the PE to the Sleep state. When the
> > erratum occurs, the SGI is lost and the system register write does not
> > complete, causing the issuing core to hang.
> >
> > Guest accesses to these registers are not affected by this erratum, as
> > they are trapped to EL2 and handled without issuing the affected system
> > register write.
> >
> > Work around the erratum by writing 1 to the bit corresponding to the
> > target SGI INTID in GICR_ISPENDR0 of each target PE's GIC Redistributor,
> > instead of writing to the affected system registers.
> >
> > Accessing a target PE's GICR_ISPENDR0 requires its Redistributor base to
> > have been discovered. Affected platforms conform to SBBR, which requires
> > PSCI for secondary CPU boot. They therefore do not use the ACPI Parking
> > protocol, which sends an IPI before the secondary CPU has initialized
> > its Redistributor. With PSCI, a secondary CPU discovers its
> > Redistributor before becoming an IPI target.
> >
> > Signed-off-by: Kohei Enju <enju.kohei@fujitsu.com>
>
> You are posting a patch on behalf of someone else, you need to add
> your own SoB:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.3-rc7#n448
Thanks for pointing this out. I'll let Tomohiro know.
>
> > ---
> > Changes in v2:
> > - Clarify the erratum description and document that virtual accesses are
> > unaffected.
> > - Remove the gic_send_sgi_via_rdist() helper.
> > - Remove the write-count rationale.
> > - Use the CPU MIDR instead of the SoC ID for filtering.
> >
> > Note that I have left the dsb(st) after the GICR_ISPENDR0 writes
> > unchanged, pending clarification of the required completion point. If
> > the writes must be observed by a specific component before
> > gic_ipi_send_mask() returns, I will use the appropriate mechanism to
> > provide that guarantee.
>
> See below.
>
> [...]
>
> > @@ -1386,6 +1391,17 @@ static void gic_ipi_send_mask(struct irq_data *d, const struct cpumask *mask)
> > */
> > dsb(ishst);
> >
> > + if (static_branch_unlikely(&gic_fujitsu_030003_erratum)) {
> > + for_each_cpu(cpu, mask) {
> > + void __iomem *base = gic_data_rdist_sgi_base_cpu(cpu);
> > +
> > + writel_relaxed(BIT(d->hwirq), base + GICR_ISPENDR0);
> > + }
> > +
> > + dsb(st);
>
> What is this DSB achieving? As far as I can tell, not much. The memory
> type is nGnRE, so DSB doesn't force writes to reach the end-point, and
> only guarantee ordering that system register SGI generation doesn't
> provide.
Yes, you're right.
>
> So either
>
> (a) there is a functional requirement on this HW to have a DSB, and
> needs to be documented,
>
> (b) or there is a need for end-point synchronisation, which needs to
> be enforced by a read back (knowing that the sysreg doesn't
> provide this guarantee), and this needs to be documented,
>
> (c) or this is completely superfluous and can be dropped
>
> Which case are we in?
I think this falls under (c). As far as I can tell, there is no
requirement for ipi_send_mask() to wait for the writes to be observed by
the hardware. I'm not aware of any hardware-specific requirements for
this DSB either. I'll drop the DSB and test the change on our hardware.
Thanks,
Kohei
prev parent reply other threads:[~2026-10-20 7:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 10:00 [PATCH v2 0/4] arm64: Add workarounds for FUJITSU-MONAKA CPU Tomohiro Misono
2026-10-16 10:00 ` [PATCH v2 1/4] arm64: cputype: Add FUJITSU MONAKA definition Tomohiro Misono
2026-10-16 11:51 ` Mark Rutland
2026-10-16 10:00 ` [PATCH v2 2/4] arm64: tlb: Add tlbi workaround for FUJITSU-MONAKA Erratum E#030001 Tomohiro Misono
2026-10-16 11:50 ` Mark Rutland
2026-10-16 12:35 ` Marc Zyngier
2026-10-19 9:23 ` Vladimir Murzin
2026-10-19 9:38 ` Tomohiro Misono (Fujitsu)
2026-10-16 10:00 ` [PATCH v2 3/4] perf: arm_pmu: Add workaround for FUJITSU-MONAKA Erratum E#030002 Tomohiro Misono
2026-10-16 12:08 ` Mark Rutland
2026-10-16 13:00 ` Tomohiro Misono (Fujitsu)
2026-10-16 13:27 ` Mark Rutland
2026-10-19 6:19 ` Tomohiro Misono (Fujitsu)
2026-10-19 9:24 ` Vladimir Murzin
2026-10-16 10:00 ` [PATCH v2 4/4] irqchip/gicv3: Add workaround for FUJITSU-MONAKA erratum E#030003 Tomohiro Misono
2026-10-17 11:48 ` kernel test robot
2026-10-19 12:53 ` Kohei Enju
2026-10-17 12:27 ` Marc Zyngier
2026-10-20 7:20 ` Kohei Enju [this message]
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=atcTtojPd1BSS8fr@FCCLS0092175.localdomain \
--to=enju.kohei@fujitsu.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=misono.tomohiro@fujitsu.com \
--cc=oupton@kernel.org \
--cc=radu@rendec.net \
--cc=rdunlap@infradead.org \
--cc=seiden@linux.ibm.com \
--cc=skhan@linuxfoundation.org \
--cc=suzuki.poulose@arm.com \
--cc=tglx@kernel.org \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.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®