write_csr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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