powerps/pseries/dma: Add support for 2M IOMMU page size
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 6 Oct 2021 04:47:35 +0000 (15:47 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 8 Oct 2021 13:15:57 +0000 (00:15 +1100)
commit3872731187141d5d0a5c4fb30007b8b9ec36a44d
tree27137225324d6bfd83a49cb09a24b028e9fcc246
parente4e737bb5c170df6135a127739a9e6148ee3da82
powerps/pseries/dma: Add support for 2M IOMMU page size

The upcoming PAPR spec adds a 2M page size, bit 23 right after 16G page
size in the "ibm,query-pe-dma-window" call.

This adds support for the new page size. Since the new page size is out
of sorted order, this changes the loop to not assume that shift[] is
sorted.

This has now been tested and is known to work on a pre-release version
of phyp.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Leonardo Bras <leobras.c@gmail.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211006044735.1114669-1-aik@ozlabs.ru
arch/powerpc/platforms/pseries/iommu.c