[RFC PATCH v4 09/15] iommu/io-pgtable-arm: Prepare PTE methods for handling multiple entries
Christoph Hellwig
hch at infradead.org
Thu Apr 8 15:02:30 BST 2021
On Thu, Apr 08, 2021 at 02:59:26PM +0100, Will Deacon wrote:
> > -static void __arm_lpae_sync_pte(arm_lpae_iopte *ptep,
> > +static void __arm_lpae_sync_pte(arm_lpae_iopte *ptep, int num_entries,
> > struct io_pgtable_cfg *cfg)
> > {
> > dma_sync_single_for_device(cfg->iommu_dev, __arm_lpae_dma_addr(ptep),
> > - sizeof(*ptep), DMA_TO_DEVICE);
> > + sizeof(*ptep) * num_entries, DMA_TO_DEVICE);
> > }
>
> Have you tested this with CONFIG_DMA_API_DEBUG=y? I _think_ it should be
> ok as long as we don't attempt to sync across a page boundary, but it would
> be good to give it a spin just to check.
syncing over a page boundary is perfectly fine. It just needs to say in
the bounds of the original mapping.
More information about the linux-arm-kernel
mailing list