ccio_mark_invalid(9)
π 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 changebyte_cnttopages_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:
ccio_alloc_range(9)ccio_free_range(9)ccio_io_pdir_entry(9)ccio_clear_io_tlb(9)ccio_dma_supported(9)ccio_map_single(9)ccio_unmap_phys(9)ccio_alloc(9)ccio_free(9)ccio_map_sg(9)ccio_unmap_sg(9)ccio_find_ioc(9)ccio_get_iommu(9)ccio_ioc_init(9)ccio_probe(9)ccio_init(9)
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
- 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