[RFC PATCH] iommu: map reserved memory as cacheable if device is coherent

Jason Gunthorpe jgg at ziepe.ca
Wed Jul 26 05:32:22 PDT 2023


On Wed, Jul 26, 2023 at 03:29:47PM +0300, Laurentiu Tudor wrote:
> 
> 
> On 7/26/2023 3:22 PM, Jason Gunthorpe wrote:
> > On Tue, Jul 25, 2023 at 05:00:55PM +0300, laurentiu.tudor at nxp.com wrote:
> > > From: Laurentiu Tudor <laurentiu.tudor at nxp.com>
> > > 
> > > Check if the device is marked as DMA coherent in the DT and if so,
> > > map its reserved memory as cacheable in the IOMMU.
> > > 
> > > Signed-off-by: Laurentiu Tudor <laurentiu.tudor at nxp.com>
> > > ---
> > >   drivers/iommu/of_iommu.c | 3 +++
> > >   1 file changed, 3 insertions(+)
> > 
> > This only makes sense for IOMMU_RESV_DIRECT - is that your use case?
> > Maybe mention that in the commit message
> 
> Yep. Will respin with an improved commit message.
> 
> > And add a fixes for the commit that introduces IOMMU_RESV_DIRECT into
> > of_iommu.c
> 
> Would it make more sense to mention the commit [1] that actually added this
> support for mapping reserved memory in IOMMU?
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5bf3cfce8cb77d9d24613ab52d520896f83dd48

Yes, that should be marked Fixes: - it added IOMMU_RESV_DIRECT without
forming the PROT properly

Jason



More information about the linux-arm-kernel mailing list