rproc_add_subdev(9)
π NAME π
rproc_add_subdev β bestie, this is the one that adds a subdevice to a remoteproc β¨
So like, we're in the Kernel API Manual, page rproc_add_subdev(9), and honestly? It's giving "small function, big responsibilities." Let's get into it π«Ά
πΈ SYNOPSIS πΈ
void rproc_add_subdev (struct rproc *rproc , struct rproc_subdev *subdev
);
Yeah that's it. Two args, no return value, void and unbothered π
π ARGUMENTS π
rprocβ the rproc handle you're adding the subdevice to π like, this is the main character's home, okay?subdevβ the subdev handle you're registering πΈ this is the little guy moving in.
π¦ DESCRIPTION π¦
Okay so real talk: the caller is responsible for populating the optional subdevice function pointers. That's on you, bestie. Not the function's problem. Not the kernel's problem. Yours π
So like, before you call this, make sure you've filled in whatever optional function pointers your subdevice needs. rproc_add_subdev is not gonna do it for you β no cap, it literally just adds and registers. The rest? That's your lore to write βοΈ
β SEE ALSO β
Lowkey the longest SEE ALSO ever, but we don't gatekeep here π First up, the kernel file it lives in:
./drivers/remoteproc/remoteproc_core.c
And then, the whole friend group:
rproc_da_to_va(9)rproc_find_carveout_by_name(9)rproc_check_carveout_da(9)rproc_handle_vdev(9)rproc_handle_trace(9)rproc_handle_devmem(9)rproc_alloc_carveout(9)rproc_release_carveout(9)rproc_handle_carveout(9)rproc_add_carveout(9)rproc_mem_entry_init(9)rproc_of_resm_mem_entry_init(9)rproc_of_parse_firmware(9)rproc_alloc_registered_carveouts(9)rproc_resource_cleanup(9)rproc_trigger_recovery(9)rproc_crash_handler_work(9)rproc_boot(9)rproc_shutdown(9)rproc_detach(9)rproc_get_by_phandle(9)rproc_set_firmware(9)rproc_add(9)devm_rproc_add(9)rproc_type_release(9)rproc_alloc(9)rproc_free(9)rproc_put(9)rproc_del(9)devm_rproc_alloc(9)rproc_remove_subdev(9)rproc_get_by_child(9)rproc_report_crash(9)
Go read them all, iykyk πβ¨ (also rproc_remove_subdev is right there at the end β foreshadowing, bestie π)
Reminder boo: populate those optional function pointers before you call this. That's the whole caveat and it's non-negotiable π
Okay that's the whole page! This one's from the ./drivers/remoteproc corner of the kernel, dated October 2026, and it's rproc_add_subdev(9) β slay, go add some subdevices responsibly ππβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms