From: "Maulik Shah (mkshah)" <maulik.shah@oss.qualcomm.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
Ulf Hansson <ulf.hansson@oss.qualcomm.com>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 3/3] arm64: dts: qcom: qcm2290: Hook up MPM
Date: Wed, 15 Jul 2026 18:07:47 +0530 [thread overview]
Message-ID: <ff6f8e27-5489-4d63-afeb-a38881d717d0@oss.qualcomm.com> (raw)
In-Reply-To: <b434e198-2778-4dd6-8896-f7f54bc9b8e2@samsung.com>
On 7/15/2026 11:44 AM, Marek Szyprowski wrote:
> On 14.07.2026 15:29, Maulik Shah (mkshah) wrote:
>> On 7/14/2026 6:34 PM, Ulf Hansson wrote:
>>> On Thu, Jul 9, 2026 at 1:41 PM Marek Szyprowski
>>> <m.szyprowski@samsung.com> wrote:
>> [...]
>>
>>> Without detailed HW expertise (still learning about the UnoQ), it
>>> looks to me that the HW may have been modelled upside down.
>>>
>>> The power-domain-cpu-cluster should probably *not* be the consumer of
>>> the mpm, but rather the opposite. This is how qcom,rpmh-rsc works, for
>>> example.
>> Agree, There is a series [1] sent out to fix modeling similar to how rpmh-rsc works.
>>
>> [1] https://lore.kernel.org/lkml/20260713-b4-shikra_lpm_addition-v1-0-3d858df2cbbf@oss.qualcomm.com/
> Indeed that series fixes the modelling issue, but it doesn't change much
> from the spinlock vs. raw_spinlock perspective. There is still the
> 'invalid wait context' issue there, because mbox API cannot be properly
> called from cpu_pm_notifier (which use raw_notifier internally):
Okay, i see why series [1] did not help for agatti due to fallback on CPU PM notification.
On PREEMPT_RT kernel, GENPD is marked as always RPM always on,
So MPM driver never get the .power_off callback it registered for and hence MPM irqchip won't invoke mbox_() APIs.
from drivers/cpuidle/cpuidle-psci-domain.c,
/*
* On a PREEMPT_RT based configuration the domain idle states are
* supported, but only during system-wide suspend.
*/
if (IS_ENABLED(CONFIG_PREEMPT_RT))
pd->flags |= GENPD_FLAG_RPM_ALWAYS_ON;
The series [1] fallbacks to CPU_PM based notification if "power-domains" property is not added.
having a power-domains property would have avoided the BUG for agatti on RT kernel.
Agatti device tree change in the series [2] only removed power-domain-cells# but did not add power-domains = <&cluster_pd>;
with the reason that qrb2210-rb1.dts had deleted "cluster_pd" however qrb2210-arduino-imola.dts still have it.
so below change on top of [1] series would avoid the BUG from mpm_cpu_pm_callback().
--- a/arch/arm64/boot/dts/qcom/agatti.dtsi
+++ b/arch/arm64/boot/dts/qcom/agatti.dtsi
@@ -281,6 +281,7 @@ mpm: interrupt-controller {
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&intc>;
+ power-domains = <&cluster_pd>;
qcom,mpm-pin-count = <96>;
qcom,mpm-pin-map = <2 275>, /* TSENS0 uplow */
<5 296>, /* Soundwire master_irq */
diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index bf6fb12ad990..7dc2cade0a7f 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -246,6 +246,10 @@ &cpu_pd3 {
/delete-node/ &cluster_pd;
+&mpm {
+ /delete-property/ power-domains;
+};
+
[2] https://lore.kernel.org/linux-arm-msm/20260713-b4-shikra_lpm_addition-v1-0-3d858df2cbbf@oss.qualcomm.com/T/#m5bbdb535424c38209cc08e6afeae5e3aac9f6cc0
Thanks,
Maulik
>
> =============================
> [ BUG: Invalid wait context ]
> 7.2.0-rc3-next-20260714+ #16842 Not tainted
> -----------------------------
> swapper/3/0 is trying to lock:
> ffff0000008ac408 (&chan->lock){....}-{3:3}, at: mbox_send_message+0x3c/0x15c
> other info that might help us debug this:
> context-{5:5}
> locks held by swapper/3/0: 1, last CPU#3:
> #0: ffffd99263a61228 (cpu_pm_notifier.lock){....}-{2:2}, at: cpu_pm_enter+0x28/0x78
> stack backtrace:
> CPU: 3 UID: 0 PID: 0 Comm: swapper/3 Not tainted 7.2.0-rc3-next-20260714+ #16842 PREEMPT
> Hardware name: Arduino UnoQ (DT)
> Call trace:
> show_stack+0x18/0x24 (C)
> dump_stack_lvl+0x8c/0xcc
> dump_stack+0x18/0x24
> __lock_acquire+0x928/0x1f90
> lock_acquire+0x2b8/0x3ec
> _raw_spin_lock_irqsave+0x60/0x88
> mbox_send_message+0x3c/0x15c
> handle_rpm_notification+0x58/0x114
> mpm_cpu_pm_callback+0x9c/0xdc
> notifier_call_chain+0xa0/0x234
> raw_notifier_call_chain_robust+0x48/0xa8
> cpu_pm_enter+0x40/0x78
> __psci_enter_domain_idle_state.isra.0+0x48/0x470
> psci_enter_domain_idle_state+0x18/0x24
> cpuidle_enter_state+0xbc/0x428
> cpuidle_enter+0x38/0x50
> do_idle+0x158/0x324
> cpu_startup_entry+0x38/0x3c
> secondary_start_kernel+0x138/0x158
> __secondary_switched+0xc0/0xc4
>
> Best regards
next prev parent reply other threads:[~2026-07-15 12:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 0:01 [PATCH 0/3] MPM hooking upping Konrad Dybcio
2023-12-15 0:01 ` [PATCH 1/3] arm64: dts: qcom: sm6375: Hook up MPM Konrad Dybcio
2023-12-15 0:01 ` [PATCH 2/3] arm64: dts: qcom: msm8996: " Konrad Dybcio
2023-12-15 0:01 ` [PATCH 3/3] arm64: dts: qcom: qcm2290: " Konrad Dybcio
[not found] ` <CGME20260709114143eucas1p18463122323bdeae8e63b1d13cd626b55@eucas1p1.samsung.com>
2026-07-09 11:41 ` Marek Szyprowski
2026-07-14 13:04 ` Ulf Hansson
2026-07-14 13:29 ` Maulik Shah (mkshah)
2026-07-15 6:14 ` Marek Szyprowski
2026-07-15 12:37 ` Maulik Shah (mkshah) [this message]
2026-07-16 8:36 ` Marek Szyprowski
2026-08-12 15:47 ` Maulik Shah (mkshah)
2026-07-15 9:28 ` Konrad Dybcio
2026-07-14 13:27 ` Maulik Shah (mkshah)
2023-12-17 17:21 ` [PATCH 0/3] MPM hooking upping Bjorn Andersson
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=ff6f8e27-5489-4d63-afeb-a38881d717d0@oss.qualcomm.com \
--to=maulik.shah@oss.qualcomm.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=ulf.hansson@oss.qualcomm.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®