ccio_mark_invalid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ccio_mark_invalid β€” from the Kernel API Manual (ccio_mark_invalid(9))

okay so bestie, gather round, because this little function is doing backstage cleanup work and honestly? underrated. it's a void function, meaning it doesn't hand you anything back β€” it just does the thing and dips. no cap. ✨


🌸 SYNOPSIS 🌸

void ccio_mark_invalid (struct ioc *ioc , dma_addr_t iova , size_t
byte_cnt );

like, that's the whole vibe. takes three things, returns nothing, slays quietly. πŸŽ€


πŸ’– ARGUMENTS πŸ’–

  • ioc β€” the I/O Controller. this is the main character right here, the whole reason we're gathered. πŸ‘‘
  • iova β€” the I/O Virtual Address. the address in question, the one we're about to yeet into invalidity. πŸ¦‹
  • byte_cnt β€” the requested number of bytes to be freed from the I/O Pdir. that's the amount you're asking it to free. not a vibe-based estimate, an actual count, bestie. 🌸

✨ DESCRIPTION ✨

so here's what it actually does: it marks the I/O Pdir entries invalid, and then it blows away the corresponding I/O TLB entries. two-for-one. the way that it just handles both at once? we love her for it. πŸ’…

now, the FIXMEs β€” and listen, there are three of them, so pay attention, because these are the "the author left a note in the group chat" moments and they are literally in the original, so I'm passing them straight to you, no edits:

FIXME: at some threshold it might be "cheaper" to just blow away the entire I/O TLB instead of individual entries.
FIXME: Uturn has 256 TLB entries. We don't need to purge every PDIR entry - just once for each possible TLB entry. (We do need to maker I/O PDIR entries invalid regardless).

(that "maker" typo? yeah, that's verbatim, I'm not touching it, it's part of the lore now πŸ™ˆ)

FIXME: Can we change byte_cnt to pages_mapped?

three open questions, zero answers, absolute icon behaviour. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, linked from the kernel file ./drivers/parisc/ccio-dma.c:

go read them, they're all iykyk. 🫢


and that's a wrap, bestie! this one came to you straight outta ./drivers/parisc, dated October 2026, and it's ccio_mark_invalid(9) forever and always. stay invalid (in the Pdir sense only!!). πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from