rproc_detach(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rproc_detach(9)

okay so this is a page straight outta the Kernel API Manual (that's the manual name, bestie, we're fancy now) and it's all about rproc_detach β€” one little function with main character energy. sit down, grab a strawberry πŸ“, let's go.


✨ NAME ✨

rproc_detach β€” detach the remote processor from the remoteproc core. yeah. that's the whole gig. iconic honestly πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

int rproc_detach (struct rproc *rproc );

🌸 ARGUMENTS 🌸

  • rproc β€” the remote processor. that's it. that's the argument. it's the one thing you gotta hand over 🫢

πŸ’– DESCRIPTION πŸ’–

so what it does is: it detaches a remote processor β€” and like, specifically one that was previously attached to with rproc_attach. so this is the breakup function, not the first-date function, iykyk πŸ’”βœ¨

now here's the lowkey important part: in case rproc is still being used by an additional user(s), this function will just decrement the power refcount and exit, without disconnecting the device. so no dramatic goodbye scene. it literally just goes "noted" and leaves 😭 it is NOT severing the connection if other people are still holding on.

rproc_detach calls __rproc_detach in order to let a remote processor know that services provided by the application processor are no longer available. that's the whole message. "bestie the app processor services are gone, no cap."

and from there β€” this is the slay part β€” it should be possible to remove the platform driver and even power cycle the application processor (if the HW supports it) without needing to switch off the remote processor. so you can restart one side without dragging the other down with you. healthy boundaries periodt πŸ§šβ€β™€οΈ

⚠️ just remember: that power-cycle thing is conditional β€” if the HW supports it. don't come for me if your hardware says no πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • and an appropriate error value otherwise πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/remoteproc/remoteproc_core.c, and honestly the whole friend group:


🌈 and that's the page!! this lil gem lives in ./drivers/remoteproc and it's stamped October 2026 β€” future vibes only ⭐ go detach something responsibly, mwah πŸ’œπŸŽ€
πŸ“¦ where this page comes from