From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v2 2/2] iommu/dma: Implement PCI allocation optimisation Date: Mon, 23 Jan 2017 17:39:58 +0000 Message-ID: <20170123173957.GD28914@arm.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Robin Murphy Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Mon, Jan 16, 2017 at 01:24:55PM +0000, Robin Murphy wrote: > Whilst PCI devices may have 64-bit DMA masks, they still benefit from > using 32-bit addresses wherever possible in order to avoid DAC (PCI) or > longer address packets (PCIe), which may incur a performance overhead. > Implement the same optimisation as other allocators by trying to get a > 32-bit address first, only falling back to the full mask if that fails. > > Signed-off-by: Robin Murphy > --- > drivers/iommu/dma-iommu.c | 21 +++++++++++++++------ > 1 file changed, 15 insertions(+), 6 deletions(-) Looks good to me, and has the added benefit of getting PCI ethernet working on Juno when using the SMMU. Unintended side-effect, but: Acked-by: Will Deacon Will