sba_search_bitmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ sba_search_bitmap β€” it's giving "find me some free space" ✨

okay so bestie, welcome to the sba_search_bitmap(9) page πŸ’… this is a Kernel API Manual entry and honestly? it's lowkey iconic. it lives in the kernel sources and it's here to help you snatch some consecutive free bits out of an IO PDIR resource bitmap. no cap. let's get into it 🫢


🌸 SYNOPSIS 🌸

unsigned long sba_search_bitmap (struct ioc *ioc , struct device *dev ,
unsigned long bits_wanted );

like, that's the whole thing. three args, one unsigned long coming back at you ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • ioc β€” the IO MMU structure that owns the pdir we care about. it's the main character here, the one holding the goods πŸ‘‘
  • dev β€” the device we're querying the bitmap for. gotta know who's asking, periodt πŸ’β€β™€οΈ
  • bits_wanted β€” literal number of entries we need. how many bits are we shopping for, bestie πŸ›οΈ

πŸ’– DESCRIPTION πŸ’–

so what does it actually do? it finds consecutive free bits in the resource bitmap β€” and each bit represents one entry in the IO Pdir. that's the whole vibe check ✨

and here's the fun part, the original literally calls it out: Cool perf optimization: search for log2(size) bits at a time. πŸ”₯ she's efficient, she's smart, she ate that fr fr πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

bestie these are all the siblings, the whole friend group πŸ˜­πŸ’œ β€” and they all hang out in the kernel file ./drivers/parisc/sba_iommu.c:

go read them too, iykyk πŸ“šπŸŒΈ


ngl if you're poking around in ./drivers/parisc you're already kind of a legend πŸ§šπŸ’œ

and that's the page!! tysm for reading, slay πŸ’…βœ¨

sign-off time πŸŽ€ β€” this one's from the ./drivers/parisc corner of the kernel, dated October 2026, and it's the sba_search_bitmap(9) manual page living its best life. mwah πŸ’‹

πŸ“¦ where this page comes from