write_csr(9)
π write_csr(9) β the kernel API manual, bestie edition π
okay so you found yourself in the write_csr(9) page, welcome, this is the one where we literally just write a CSR. that's it. that's the vibe. no cap.
β¨ NAME β¨
write_csr β write CSR at the indicated offset π
like, you give it an offset, it writes the CSR there. iconic behaviour honestly.
πΈ SYNOPSIS πΈ
void write_csr (const struct hfi1_devdata *dd , u32 offset , u64 value
);
she takes three things and returns void, meaning she does the thing and gives you nothing back. no receipt, no text-back, just vibes. π
π¦ ARGUMENTS π¦
ddβ the dd device. yes that's the whole description, and honestly? she's the main character here. π«Άoffsetβ the offset of the CSR within bar0. like, which CSR. be specific bestie. πvalueβ value to write. the actual thing going in. that's her. β
π SEE ALSO π
first up, the kernel file, which is literally right here:
./drivers/infiniband/hw/hfi1/chip.c
and then the whole friend group, pls go read these too, they're all linked:
hfi1_addr_from_offset(9), read_csr(9), get_csr_addr(9), update_xmit_counters(9), apply_link_downgrade_policy(9), is_rcv_avail_int(9), is_rcv_urgent_int(9), general_interrupt(9), hfi1_rcd_eoi_intr(9), hfi1_netdev_rx_napi(9), data_vls_operational(9), encode_rcv_header_entry_size(9), hfi1_validate_rcvhdrcnt(9), set_hdrq_regs(9), update_statusp(9), wait_logical_linkstate(9), read_mod_write(9), set_intr_bits(9), set_up_interrupts(9), hfi1_get_qp_map(9), init_qpmap_table(9), init_qos(9), hfi1_init_dd(9), create_pbc(9)
side note: read_csr(9) is also in there and she is literally the opposite of this one, so if you wanted to read instead of write, that's your girl. balance. π
okay that's the whole page, you ate it, go write some CSRs responsibly πβ¨
./drivers/infiniband/hw/hfi1 β dated October 2026 β and this lil write_csr(9) era is officially signed off, mwah, love u, bye ππ¦π
π¦ 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