On Tue, Apr 22, 2025 at 04:09:21PM -0500, Jason Gunthorpe wrote: > On Mon, Apr 21, 2025 at 10:46:19PM -0400, Ben Collins wrote: > > diff --git a/drivers/iommu/fsl_pamu_domain.c > > b/drivers/iommu/fsl_pamu_domain.c > > index 30be786bff11e..a4bc6482a00f7 100644 > > --- a/drivers/iommu/fsl_pamu_domain.c > > +++ b/drivers/iommu/fsl_pamu_domain.c > > @@ -214,9 +214,10 @@ static struct iommu_domain > > *fsl_pamu_domain_alloc(unsigned type) > > INIT_LIST_HEAD(&dma_domain->devices); > > spin_lock_init(&dma_domain->domain_lock); > > > > - /* default geometry 64 GB i.e. maximum system address */ > > + /* Set default geometry based on physical address limit. */ > > dma_domain->iommu_domain. geometry.aperture_start = 0; > > - dma_domain->iommu_domain.geometry.aperture_end = (1ULL << 36) - 1; > > + dma_domain->iommu_domain.geometry.aperture_end = > > + (1ULL << PAMU_MAX_PHYS_BITS) - 1; > > dma_domain->iommu_domain.geometry.force_aperture = true; > > What on earth does this even do? There is no map_range() callback in > this driver, so nothing should be reading geometry..
I dunno, but your "FIXME this is broken" comments are all over it from a year and a half ago: Author: Jason Gunthorpe <j...@ziepe.ca> Date: Wed Sep 13 10:43:38 2023 -0300 iommu/fsl_pamu: Implement a PLATFORM domain /* * FIXME: This isn't creating an unmanaged domain since the * default_domain_ops do not have any map/unmap function it doesn't meet * the requirements for __IOMMU_DOMAIN_PAGING. The only purpose seems to * allow drivers/soc/fsl/qbman/qman_portal.c to do * fsl_pamu_configure_l1_stash() */ The logic hasn't really been touched in 10 years. -- Ben Collins https://libjwt.io https://github.com/benmcollins -- 3EC9 7598 1672 961A 1139 173A 5D5A 57C7 242B 22CF
signature.asc
Description: PGP signature