stm_source_link_add(9)
π stm_source_link_add(9) π
okay so bestie, welcome to the Kernel API Manual β this page is all about stm_source_link_add, and yes it's a whole vibe. it's basically the matchmaker function of the STM world and i'm obsessed π«Ά
β¨ NAME β¨
stm_source_link_add β connect an stm_source device to an stm device π
π¦ SYNOPSIS π¦
int stm_source_link_add (struct stm_source_device *src , struct
stm_device *stm );
like, that's the whole signature, no cap β¨
πΈ ARGUMENTS πΈ
srcβ your stm_source device, the one with the tea to spill βstmβ your stm device, the one who's gonna hear all about it π
π DESCRIPTION π
so what this function does is establish a link from stm_source to an stm device β the whole point being that the former (that's stm_source, hi) can send out trace data to the latter (that's stm, hiii). it's giving "i know a guy" energy, fr fr π₯
β RETURN β
0 on success, -errno otherwise. slay when it's zero, weep when it's not π
ngl if you get anything that isn't0, that's your-errnotelling you something went sideways. read the room (and the errno) π
π SEE ALSO π
kernel file ./drivers/hwtracing/stm/core.c plus the whole friend group:
stm_find_device(9)stm_put_device(9)stm_data_write(9)__stm_source_link_drop(9)stm_source_link_drop(9)stm_source_register_device(9)stm_source_unregister_device(9)
okay that's the whole page bestie, no notes π this one comes straight out of ./drivers/hwtracing/stm, dated October 2026, and it's signed stm_source_link_add(9) β iconic, periodt πβ¨π¦
π¦ 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