check_for_req_inflight(9)
π check_for_req_inflight(9) β the "is anyone else using that address rn??" check π
okay bestie, so this one's a kernel API manual page for check_for_req_inflight(9) and it's genuinely so important, like it's the vibe-check function for RSC/TCS traffic. let's get into it β¨
πΈ SYNOPSIS πΈ
int check_for_req_inflight (struct rsc_drv *drv , struct tcs_group *tcs
, const struct tcs_request *msg );
like yes, that's the whole signature, no cap π«Ά
π ARGUMENTS π
drvβ the controller. literally the main character of this whole operation πtcsβ a pointer to thetcs_groupused for ACTIVE_ONLY transfers. she's the group we're snooping through πmsgβ the message we wanna send. it's giving "several addr/data pairs to program" energy, but likeβ¦ few enough that they all fit in one TCS. cozy. π§
π¦ DESCRIPTION π¦
so what this does is it walks through the TCSes in the group and checks if any of them appear to be sending to addresses referenced in the message. like it's doing a little background check on everyone's addresses, very detective of her πβ¨
if it finds one? it'll return -EBUSY. boom. not today. π
Only for use for active-only transfers. β pls respect this, it's not a suggestion π
β οΈ Must be called with thedrv->lockheld since that protectstcs_in_use. like fr fr, do not skip the lock, that's the whole safety vibe π
β RETURN β
0if nothing is in flight β slay, you're clear, go off π-EBUSYif we should try again later β she's busy bestie, come back π
and listen: the caller must re-enable interrupts between tries since that's the only way tcs_in_use will ever be updated and the only way RSC_DRV_CMD_ENABLE will ever be cleared. like that's not optional, that's the whole mechanism, iykyk π₯
π SEE ALSO π
kernel file ./drivers/soc/qcom/rpmh-rsc.c plus the whole friend group:
tcs_invalidate(9), rpmh_rsc_invalidate(9), get_tcs_for_msg(9), get_req_from_tcs(9), __tcs_set_trigger(9), enable_tcs_irq(9), tcs_tx_done(9), __tcs_buffer_write(9), find_free_tcs(9), claim_tcs_for_req(9), rpmh_rsc_send_data(9), find_slots(9), rpmh_rsc_write_ctrl_data(9), rpmh_rsc_ctrlr_is_busy(9), rpmh_rsc_write_next_wakeup(9), rpmh_rsc_cpu_pm_callback(9), rpmh_rsc_pd_callback(9)
like that's the whole squad, go read them too, they all ate π β¨
and that's the page bestie!! π source/version vibes live at ./drivers/soc/qcom and this lil icon was dated October 2026 β mwah, love u, go hold that lock properly π«Άπ
π¦ 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