pm_num_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pm_num_pages(9) β€” Kernel API Manual, but make it bestie-friendly πŸ’–

okay so welcome to the pm_num_pages(9) page from the Kernel API Manual, bestie. This one is short, iconic, and very β€œthe hardware said what it said.” ✨


✨ NAME ✨

pm_num_pages β€” calculate the number of pages of the payload memory. That's the name, and yes, it ate. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

the signature is giving exact C energy, so here it is verbatim, no cap:

unsigned int pm_num_pages (unsigned int mem_size , unsigned int pg_size
       );

πŸ’… ARGUMENTS πŸ’…

  • mem_size β€” the size of the payload memory. aka how big the payload memory is, bestie.
  • pg_size β€” the size of each payload memory page. aka the size of one page. πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture it: you’re calculating the number of pages, each of the given size, that fit in a memory of the specified size. slay.

and it’s respecting the HW requirement that the number of pages must be a multiple of 24. like, the hardware is literally not flexible on this one. multiple of 24, periodt. πŸ’€

bestie, this is the whole point: the result still has to respect that HW requirement that the number of pages must be a multiple of 24. no skipping it, no β€œclose enough.” 🫢

🌸 SEE ALSO 🌸

bestie, the SEE ALSO section is literally a whole group chat. every single one is here:


and that’s the page, bestie 🫢 source/version: ./drivers/net/ethernet/chelsio..., date: October 2026, footer vibe: pm_num_pages(9). byeee πŸ’…βœ¨

πŸ“¦ where this page comes from