udev: start DSP remoteprocs left offline - #372
Open
Loïc Minier (lool) wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
I tested this on kodiak; this is the failure mode: I manually installed the new file in /etc/udev/rules.d/59-fastrpc-remoteproc-inline.rules, ran update-initramfs -u, rebooted, and remote cores worked. That part was local, I don't have a LAVA run for that. |
| # extra reference and prevents a later shutdown or subsystem restart from taking | ||
| # effect. udev sorts all match tokens ahead of all assignments within a rule | ||
| # line, so the gate is evaluated before the write even though both name state. | ||
| ACTION=="add", SUBSYSTEM=="remoteproc", ATTR{name}=="adsp|cdsp|cdsp1|gpdsp0|gpdsp1|sdsp|slpi", ATTR{state}=="offline", ATTR{state}="start" |
Contributor
There was a problem hiding this comment.
I think there is only one of slpi and sdsp.
Contributor
Author
There was a problem hiding this comment.
Thanks, good catch, sdsp is a fastrpc internal name; I've dropped it and kept slpi that was apparently used on rb3gen2 and updated the comment in the udev rules. Apparently qcom-next has a soccp as well, should that be here?
When qcom_q6v5_pas is loaded from the initramfs, rproc_add()
auto-boots the core before the root filesystem is mounted.
/lib/firmware is not reachable yet, so request_firmware() fails with
-ENOENT, and the remoteproc core has no retry path: the DSP stays
"offline" for the rest of the boot even though the firmware is
present on disk. With no DSP there is no rpmsg channel, so no
/dev/fastrpc-* node appears and none of the daemons in
60-fastrpc.rules can start.
Add a udev rule that writes "start" to the remoteproc state attribute.
The event fires twice: once in the initramfs, where the write still fails
for the same reason the kernel's did, and again from the coldplug pass
that systemd-udev-trigger.service runs after switch_root, where the
firmware is reachable and the boot succeeds. udev logs and ignores the
failed write, so the first pass is harmless.
Only cores that qcom_q6v5_pas auto-boots and that FastRPC uses are
matched. modem and wpss have .auto_boot = false: modem is absent by
design on some SoCs, and ath11k owns the wpss lifecycle.
The ATTR{state}=="offline" gate is required: rproc_boot() increments
rproc->power unconditionally, so writing to an already-running core would
pin an extra reference and prevent a later shutdown or subsystem restart
from taking effect.
This is a userspace stopgap for the kernel bug; it can be dropped once a
kernel-side retry lands.
Link: qualcomm-linux/kernel#923
Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Loïc Minier (lool)
force-pushed
the
udev-start-remoteproc
branch
from
August 11, 2026 17:36
d0c139f to
9596054
Compare
Contributor
Author
|
We discussed this with the FastRPC team:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When qcom_q6v5_pas is loaded from the initramfs, rproc_add()
auto-boots the core before the root filesystem is mounted.
/lib/firmware is not reachable yet, so request_firmware() fails with
-ENOENT, and the remoteproc core has no retry path: the DSP stays
"offline" for the rest of the boot even though the firmware is
present on disk. With no DSP there is no rpmsg channel, so no
/dev/fastrpc-* node appears and none of the daemons in
60-fastrpc.rules can start.
Add a udev rule that writes "start" to the remoteproc state attribute.
The event fires twice: once in the initramfs, where the write still fails
for the same reason the kernel's did, and again from the coldplug pass
that systemd-udev-trigger.service runs after switch_root, where the
firmware is reachable and the boot succeeds. udev logs and ignores the
failed write, so the first pass is harmless.
Only cores that qcom_q6v5_pas auto-boots and that FastRPC uses are
matched. modem and wpss have .auto_boot = false: modem is absent by
design on some SoCs, and ath11k owns the wpss lifecycle.
The ATTR{state}=="offline" gate is required: rproc_boot() increments
rproc->power unconditionally, so writing to an already-running core would
pin an extra reference and prevent a later shutdown or subsystem restart
from taking effect.
This is a userspace stopgap for the kernel bug; it can be dropped once a
kernel-side retry lands.
Relates to qualcomm-linux/kernel#923
Fixes: #371