iommu: fix MAX_ORDER usage in __iommu_dma_alloc_pages()

MAX_ORDER is not inclusive: the maximum allocation order buddy allocator
can deliver is MAX_ORDER-1.

Fix MAX_ORDER usage in __iommu_dma_alloc_pages().

Also use GENMASK() instead of hard to read "(2U << order) - 1" magic.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kirill A. Shutemov <[email protected]>
Acked-by: Robin Murphy <[email protected]>
Reviewed-by: Jacob Pan <[email protected]>
Acked-by: Joerg Roedel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
1 file changed