STRUCT RPROC_SUBDEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so welcome to the Kernel API Manual, bestie πŸ’– β€” today's main character is struct rproc_subdev, which is literally just a subdevice tied to a remoteproc. that's the whole vibe. iykyk.


✨ SYNOPSIS ✨

here's the glow-up, character for character, no cap:

struct rproc_subdev {
    struct list_head node;
    int (*prepare)(struct rproc_subdev *subdev);
    int (*start)(struct rproc_subdev *subdev);
    void (*stop)(struct rproc_subdev *subdev, bool crashed);
    void (*unprepare)(struct rproc_subdev *subdev);
 };

like... look at her. five members, all living their truth. πŸ¦‹


πŸ’… MEMBERS πŸ’…

okay bestie let's go through the whole friend group one by one, no skipping, we are NOT summarising:

  • node β€” the list node related to the rproc subdevs list. she's literally the link in the group chat that keeps everyone connected πŸ”—
  • prepare β€” the prepare function, called before the rproc is started. so like, she gets ready before the party even begins πŸ’„
  • start β€” the start function, called after the rproc has been started. she shows up once the party's already going πŸ”₯
  • stop β€” the stop function, called before the rproc is stopped. and plot twist: the crashed parameter indicates if this originates from a recovery 😭 so if crashed is set, the vibe check failed and we're in recovery mode
  • unprepare β€” the unprepare function, called after the rproc has been stopped. the "okay bestie goodnight" of the whole operation πŸŒ™
🫢 note the order, babes: prepare β†’ before start, start β†’ after started, stop β†’ before stopped, unprepare β†’ after stopped. the sequencing is the whole point, don't freelance it.

πŸ” SEE ALSO πŸ”

if you wanna keep reading (and you KNOW you do πŸ‘‘), go check out the kernel file ./include/linux/remoteproc.h β€” she's the source of truth. and then these iconic neighbours:

  • struct rproc_mem_entry(9)
  • enum rsc_handling_status(9)
  • struct rproc_ops(9)
  • enum rproc_state(9)
  • enum rproc_crash_type(9)
  • enum rproc_dump_mechanism(9)
  • struct rproc_dump_segment(9)
  • enum rproc_features(9)
  • struct rproc(9)
  • struct rproc_vring(9)
  • struct rproc_vdev(9)

like a whole friend group of structs and enums, we love to see it 🌈


and that's the tea β˜• β€” this page came from ./include/linux, dated October 2026, and yes the title is still struct rproc_subdev(9) because legends never change their name πŸ’œ slay, bye! πŸ’…βœ¨

πŸ“¦ where this page comes from