coresight_timeout_action(9)
π 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:
- struct
coresight_node(9) coresight_blocks_source(9)coresight_get_sink_by_id(9)coresight_get_ref(9)coresight_put_ref(9)_coresight_build_path(9)coresight_release_path(9)coresight_select_best_sink(9)coresight_find_sink(9)coresight_find_default_sink(9)coresight_clear_default_sink(9)
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
- 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