From: sashiko-bot@kernel.org
To: christian.koever-draxl@student.uibk.ac.at
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH v2 2/2] firmware: meson: sm: make power-off work on S4
Date: Fri, 06 Nov 2026 10:26:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-201214@kernel.org> (raw)
In-Reply-To: <20261106101854.46569-3-christian.koever-draxl@student.uibk.ac.at>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] firmware: meson: duplicate meson-sm prefix in
meson_sm_power_off_prepare()
--
commit 0142b0300be6322393138fbe4dbbf32405872dee
Author: Christian Stefan Kövér-Draxl <ckoever@outlook.de>
firmware: meson: sm: make power-off work on S4
This commit registers a power-off prepare handler for Amlogic S4 that
offlines secondary CPUs and sets the firmware shutdown flag before PSCI
SYSTEM_OFF.
> diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
> index ab9751a59b552..de0c8e809c516 100644
> --- a/drivers/firmware/meson/meson_sm.c
> +++ b/drivers/firmware/meson/meson_sm.c
[ ... ]
> @@ -303,6 +306,28 @@ static struct attribute *meson_sm_sysfs_attrs[] = {
> };
> ATTRIBUTE_GROUPS(meson_sm_sysfs);
>
> +/*
> + * The S4 firmware implements PSCI SYSTEM_OFF as DDR self-refresh: on the
> + * power key it jumps back to the kernel instead of booting, which hangs the
> + * board. Setting the shutdown flag first makes it cold-boot instead, and the
> + * secondary CPUs must have been taken down through PSCI CPU_OFF beforehand,
> + * otherwise the wake-up path hangs as well. machine_power_off() only parks
> + * them, so offline them here, while CPU hotplug still works.
> + */
> +static int meson_sm_power_off_prepare(struct sys_off_data *data)
> +{
> + unsigned int cpu, primary = cpumask_first(cpu_online_mask);
> +
> + for_each_online_cpu(cpu) {
> + if (cpu != primary && remove_cpu(cpu))
> + pr_warn("meson-sm: failed to stop CPU%u\n", cpu);
[Severity: Low]
Does this duplicate the "meson-sm: " prefix in the kernel log?
drivers/firmware/meson/meson_sm.c already defines pr_fmt(fmt) as
"meson-sm: " fmt at the top of the file.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261106101854.46569-1-christian.koever-draxl@student.uibk.ac.at?part=2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2026-11-06 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 10:18 [PATCH v2 0/2] " christian.koever-draxl
2026-11-06 10:18 ` [PATCH v2 1/2] dt-bindings: firmware: amlogic,meson-gxbb-sm: add amlogic,meson-s4-sm christian.koever-draxl
2026-11-06 13:09 ` Rob Herring
2026-11-06 10:18 ` [PATCH v2 2/2] firmware: meson: sm: make power-off work on S4 christian.koever-draxl
2026-11-06 10:26 ` sashiko-bot [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=sashiko-outbox-201214@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=christian.koever-draxl@student.uibk.ac.at \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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®