Re: [PATCH 3/3] arm64: dts: qcom: qcm2290: Hook up MPM

From: Marek Szyprowski

Date: Wed Jul 15 2026 - 02:15:25 EST


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@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx/
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):

=============================
[ 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
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland