Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alexey Klimov" <alexey.klimov@linaro.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v7 6/6] arm64: dts: exynos850: add PMU interrupt generation node
Date: Wed, 30 Sep 2026 00:23:33 +0000	[thread overview]
Message-ID: <20260930002334.2650B1F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260930-exynos850-cpuhotplug-v7-6-203245826333@linaro.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] cpu/hotplug: ignored PMU callback returns mask silent CPU wakeup failures
--

commit ed843ac940e60ee64cbd03b344104cc24b925c4a
Author: Alexey Klimov <alexey.klimov@linaro.org>

arm64: dts: exynos850: add PMU interrupt generation node

Add pmu_intr_gen node for Exynos850. This hw block is required
for different power management routines like CPU hotplug and
different sleep and idle states. Also reference this node from main PMU
node.

> diff --git a/arch/arm64/boot/dts/exynos/exynos850.dtsi b/arch/arm64/boot/dts/exynos/exynos850.dtsi
> index 8a4771899a8e6..803fc127d8956 100644
> --- a/arch/arm64/boot/dts/exynos/exynos850.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos850.dtsi
> @@ -231,6 +231,7 @@ gic: interrupt-controller@12a01000 {
>  		pmu_system_controller: system-controller@11860000 {
>  			compatible = "samsung,exynos850-pmu", "syscon";
>  			reg = <0x11860000 0x10000>;
> +			google,pmu-intr-gen-syscon = <&pmu_intr_gen>;

[Severity: High]
Does enabling CPU hotplug and PMU configuration here mask silent CPU wakeup
failures?

The hotplug framework requires an error code to abort the hotplug operation,
but exynos_cpuhp_pmu_online() in drivers/soc/samsung/exynos-pmu.c
unconditionally returns 0:

drivers/soc/samsung/exynos-pmu.c:exynos_cpuhp_pmu_online() {
...
	pmu_context->pmu_data->cpu_pmu_online(pmu_context, cpu);
	/*
	 * Mark this CPU as having finished the hotplug.
	 * This means this CPU can now enter C2 idle state.
	 */
	clear_bit(cpu, pmu_context->in_cpuhp);
	raw_spin_unlock_irqrestore(&pmu_context->cpupm_lock, flags);

	return 0;
}

Similarly, exynos_cpu_pmu_online() returns NOTIFY_OK to the CPU_PM framework
even if the PMU failed to configure correctly:

drivers/soc/samsung/exynos-pmu.c:exynos_cpu_pmu_online() {
...
	pmu_context->pmu_data->cpu_pmu_online(pmu_context, cpu);
	raw_spin_unlock(&pmu_context->cpupm_lock);

	return NOTIFY_OK;
}

If topology_cluster_id() or topology_core_id() fails (or if a PMU hardware
initialization fails), the cpu_pmu_online callback returns an error code.
Since the error is unconditionally dropped, the CPU/PM frameworks are
incorrectly told the hardware operation succeeded.

Could this cause the CPU to fail to wake up, potentially hanging the hotplug
state machine or leaving the CPU permanently stuck in idle without the kernel
knowing?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260930-exynos850-cpuhotplug-v7-0-203245826333@linaro.org?part=6

  reply	other threads:[~2026-09-30  0:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  0:12 [PATCH v7 0/6] Exynos-pmu: Generalise cpu{hotplug,idle},PMU intr gen and add Exynos850 CPU hotplug Alexey Klimov
2026-09-30  0:12 ` [PATCH v7 1/6] dt-bindings: soc: move,rename google,gs101-pmu-intr-gen and add exynos850 Alexey Klimov
2026-09-30  0:12 ` [PATCH v7 2/6] dt-bindings: soc: samsung: exynos-pmu: Require pmu-intr-gen-syscon for Exynos850 Alexey Klimov
2026-09-30  0:20   ` sashiko-bot
2026-09-30  0:12 ` [PATCH v7 3/6] soc: samsung: exynos-pmu: generalise gs101-specific cpu{idle,hotplug} for Exynos SoCs Alexey Klimov
2026-09-30  0:12 ` [PATCH v7 4/6] soc: samsung: exynos-pmu: add Exynos850 CPU hotplug support Alexey Klimov
2026-09-30  0:25   ` sashiko-bot
2026-10-03 14:20   ` Krzysztof Kozlowski
2026-09-30  0:13 ` [PATCH v7 5/6] MAINTAINERS: add Exynos850 PMU entry Alexey Klimov
2026-09-30  0:13 ` [PATCH v7 6/6] arm64: dts: exynos850: add PMU interrupt generation node Alexey Klimov
2026-09-30  0:23   ` sashiko-bot [this message]
2026-10-02 12:41   ` Peter Griffin
2026-10-03 14:13     ` Krzysztof Kozlowski
2026-10-03 14:15       ` Krzysztof Kozlowski

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=20260930002334.2650B1F00899@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexey.klimov@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.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