[PATCH v3 16/23] iommu/pages: Allow sub page sizes to be passed into the allocator
Baolu Lu
baolu.lu at linux.intel.com
Wed Feb 26 04:22:10 PST 2025
On 2025/2/26 3:39, Jason Gunthorpe wrote:
> Generally drivers have a specific idea what their HW structure size should
> be. In a lot of cases this is related to PAGE_SIZE, but not always. ARM64,
> for example, allows a 4K IO page table size on a 64K CPU page table
> system.
>
> Currently we don't have any good support for sub page allocations, but
> make the API accommodate this by accepting a sub page size from the caller
> and rounding up internally.
>
> This is done by moving away from order as the size input and using size:
> size == 1 << (order + PAGE_SHIFT)
>
> Following patches convert drivers away from using order and try to specify
> allocation sizes independent of PAGE_SIZE.
>
> Signed-off-by: Jason Gunthorpe<jgg at nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
More information about the Linux-rockchip
mailing list