powerpc/iommu: Setup a default domain and remove set_platform_dma_ops
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 13 Sep 2023 13:43:36 +0000 (10:43 -0300)
committerJoerg Roedel <jroedel@suse.de>
Mon, 25 Sep 2023 09:40:53 +0000 (11:40 +0200)
commit2ad56efa80dba89162106c06ebc00b611325e584
tree700ea774f3830a1c2035f8eb32c6f9197df8acfe
parent1c68cbc64fe6ac01dc242ba562344303031a76fb
powerpc/iommu: Setup a default domain and remove set_platform_dma_ops

POWER is using the set_platform_dma_ops() callback to hook up its private
dma_ops, but this is buired under some indirection and is weirdly
happening for a BLOCKED domain as well.

For better documentation create a PLATFORM domain to manage the dma_ops,
since that is what it is for, and make the BLOCKED domain an alias for
it. BLOCKED is required for VFIO.

Also removes the leaky allocation of the BLOCKED domain by using a global
static.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/3-v8-81230027b2fa+9d-iommu_all_defdom_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
arch/powerpc/kernel/iommu.c