From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758737AbcCDIBy (ORCPT ); Fri, 4 Mar 2016 03:01:54 -0500 Received: from mailgw02.mediatek.com ([218.249.47.111]:56436 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751829AbcCDIBx (ORCPT ); Fri, 4 Mar 2016 03:01:53 -0500 Message-ID: <1457049649.26149.11.camel@mhfsdcap03> Subject: Re: [PATCH] arm64/dma-mapping: Add DMA_ATTR_ALLOC_SINGLE_PAGES support From: Yong Wu To: Doug Anderson CC: Joerg Roedel , Catalin Marinas , Will Deacon , "Matthias Brugger" , Robin Murphy , Daniel Kurtz , Tomasz Figa , "Arnd Bergmann" , Lucas Stach , "moderated list:ARM/Mediatek SoC support" , , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , , Marek Szyprowski Date: Fri, 4 Mar 2016 08:00:49 +0800 In-Reply-To: References: <1456944866-15990-1-git-send-email-yong.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-03-03 at 09:44 -0800, Doug Anderson wrote: > Hi, > > On Wed, Mar 2, 2016 at 10:54 AM, Yong Wu wrote: > > Sometimes it is not worth for the iommu allocating big chunks. > > Here we enable DMA_ATTR_ALLOC_SINGLE_PAGES which could help avoid to > > allocate big chunks while iommu allocating buffer. > > > > More information about this attribute, please check Doug's commit[1]. > > > > [1]: https://lkml.org/lkml/2016/1/11/720 > > > > Cc: Robin Murphy > > Suggested-by: Douglas Anderson > > Signed-off-by: Yong Wu > > --- > > > > Our video drivers may soon use this. > > > > arch/arm64/mm/dma-mapping.c | 4 ++-- > > drivers/iommu/dma-iommu.c | 14 ++++++++++---- > > include/linux/dma-iommu.h | 4 ++-- > > 3 files changed, 14 insertions(+), 8 deletions(-) > > It should also be mentioned that this depends on commit df05c6f6e0bb > ("ARM: 8506/1: common: DMA-mapping: add DMA_ATTR_ALLOC_SINGLE_PAGES > attribute") which is not in mainline quite yet. Thanks. I will add it in the commit message. > > Also please CC Marek Szyprowski on any future patches in this area > since I saw a patch series from him that was touching this same area. Will do. > > Reviewed-by: Douglas Anderson Thanks.