hl_state_dum...ock_monitors(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hl_state_dum...ock_monitors πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes we're in the kernel docs now, and honestly? it's giving backstage pass energy πŸŽ€. This one lives in hl_state_dum...ock_monitors(9), which is the truncated little nickname for a function with a whole government name: hl_state_dump_alloc_read_sm_block_monitors. she's long, she's iconic, she ate. πŸ’…


✨ NAME ✨

hl_state_dump_alloc_read_sm_block_monitors β€” reads the monitors for one specific block, no cap 🫢


🌸 SYNOPSIS 🌸

struct hl_mon_state_dump * hl_state_dump_alloc_read_sm_block_monitors
(struct hl_device *hdev , u32 index );

literally that's the whole signature, copy it exactly bestie, don't get creative with the spacing πŸ’€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hdev β€” pointer to the device. yes, the device device. the main character 🫢
  • index β€” the sync manager block index, and it starts with E_N β€” like, that's the starting point, keep that in mind 🌈

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she actually do? she returns an array of monitor data of size SP_MONITORS_AMOUNT β€” that's the size, exactly that, SP_MONITORS_AMOUNT ✨ β€” or NULL on error 😭. that's it. that's the whole vibe check. you ask for the monitors of a specific block, you either get a whole array of them or you get nothing at all. no in-between, periodt.

ngl, if you get NULL back that's the error path β€” don't go dereferencing it and then act surprised πŸ’€

πŸŽ€ SEE ALSO πŸŽ€

that's the whole friend group, go say hi to all of them, they're all linked, iykyk πŸ”₯


and that's the page bestie!! 🧚 this little gem comes to you from ./drivers/accel/habanalabs/common, dated October 2026 β€” so like, future vibes but make it kernel πŸ¦‹. go read your state dumps, stay hydrated, and remember: SP_MONITORS_AMOUNT or NULL, there is no third option πŸ’–βœ¨

πŸ“¦ where this page comes from