Re: [PATCH 1/2] pmdomain/rockchip: skip QoS operations for idle-only domains
From: Daniel Bozeman
Date: Mon Apr 06 2026 - 19:55:17 EST
Hi Jonas,
Thanks for digging into this and identifying the GENPD_FLAG_NO_STAY_ON
connection.
I tested on your next-20260403-rk3528 branch (7.0-rc6) with the
NanoPi Zero2.
Your conditional NO_STAY_ON patch alone results in a NULL pointer
dereference crash in run_timer_softirq during boot:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
CPU: 3 PID: 0 Comm: swapper/3
pc : run_timer_softirq+0x258/0x2c4
Call trace:
run_timer_softirq+0x258/0x2c4
handle_softirqs+0x18c/0x1d0
__do_softirq+0x10/0x18
...
do_idle+0x94/0xa0
The crash is caused by the EPROBE_DEFER teardown in
rockchip_pm_domain_probe(). When PD_GPU's clock lookup returns
-EPROBE_DEFER, the entire controller probe fails and tears down
all successfully registered domains. This corrupts timer state
and crashes in run_timer_softirq on the next tick I think.
Adding the following on top of your fix results in a clean boot
with USB working:
for_each_available_child_of_node_scoped(np, node) {
error = rockchip_pm_add_one_domain(pmu, node);
if (error) {
if (error == -EPROBE_DEFER) {
dev_dbg(dev, "skipped node %pOFn, ...\n", node);
continue;
}
...
This skips domains that defer and continues registering the rest.
Skipped domains have NULL entries in the provider, causing their
consumers to defer until the clock dependency is available.
I also tested on 6.12 with backported RK3528 support (OpenWrt).
There, GENPD_FLAG_NO_STAY_ON does not exist, but marking idle-only
domains with GENPD_FLAG_ALWAYS_ON prevents the genpd_power_off
crash. The EPROBE_DEFER fix is needed there as well -- without it,
the probe teardown/retry produces a timer warning in __run_timers.
Test results on NanoPi Zero2:
7.0-rc6 (next-20260403-rk3528):
- Your NO_STAY_ON fix only: crash in run_timer_softirq
- Your NO_STAY_ON fix + EPROBE_DEFER skip: clean boot, USB works
6.12 with backported RK3528 support (OpenWrt):
- GENPD_FLAG_ALWAYS_ON only: boots with __run_timers warning
- GENPD_FLAG_ALWAYS_ON + EPROBE_DEFER skip: clean boot