coresight_timeout_action(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… coresight_timeout_action(9) β€” from the Kernel API Manual, bestie

okay so picture this: you're in the coresight zone of the kernel, you poke a register, and now you're just... waiting for one specific bit to get its life together and flip. That's literally this whole function. It loops until a bit has changed to a specific register state, and it hits a callback after every single trial β€” yes, every one, we're checking in constantly, it's giving supportive bestie energy 🫢

No cap, it's a tiny little waiter function and it ate.


✨ NAME ✨

coresight_timeout_action β€” loop until a bit has changed to a specific register state, with a callback after every trial. πŸ’«


🌸 SYNOPSIS 🌸

int coresight_timeout_action (struct csdev_access *csa , u32 offset , int position , int value , coresight_timeout_cb_t cb );

πŸŽ€ ARGUMENTS πŸŽ€

  • csa β€” the coresight device access for the device. it's the VIP pass, the way in 🎟️
  • offset β€” offset of the register from the base of the device. where the register lives relative to base, iykyk.
  • position β€” the position of the bit of interest. the one main character bit we're all here for ⭐
  • value β€” the value the bit should have. the glow-up we're waiting on.
  • cb β€” call back after each trial. yes it's spelled "call back" in the docs, and yes it runs every single trial, not just at the end πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

It returns 0 as soon as the bit has taken the desired state, or -EAGAIN if TIMEOUT_US has elapsed β€” whichever happens first. fr fr, whoever gets there first wins, no waiting around for the other one. ⏰

lowkey important: the "whichever happens first" part is the whole vibe check. fast bit = 0, time runs out = -EAGAIN. periodt.

πŸ¦‹ SEE ALSO πŸ¦‹

Everything in the kernel file ./drivers/hwtracing/coresight/coresight-core.c:

go read them, they're iconic too πŸ‘‘


okay that's the page!! πŸ’œ it lives down in ./drivers/hwtracing/coresight, and this lil drop is dated October 2026 β€” mwah, sending you off with a kiss and a properly-timed bit flip πŸ“βœ¨

πŸ“¦ where this page comes from