Re: [PATCH 2/3] arm64: mm: reserve hugetlb CMA after numa_init

2020-06-07 Thread Matthias Brugger
On 03/06/2020 05:22, Roman Gushchin wrote: > On Wed, Jun 03, 2020 at 02:42:30PM +1200, Barry Song wrote: >> hugetlb_cma_reserve() is called at the wrong place. numa_init has not been >> done yet. so all reserved memory will be located at node0. >> >> Cc: Roman Gushchin >> Signed-off-by: Barry

Re: [PATCH v4 08/12] device core: Introduce multiple dma pfn offsets

2020-06-07 Thread Andy Shevchenko
On Fri, Jun 05, 2020 at 05:26:48PM -0400, Jim Quinlan wrote: > The new field in struct device 'dma_pfn_offset_map' is used to facilitate > the use of single or multiple pfn offsets between cpu addrs and dma addrs. > It subsumes the role of dev->dma_pfn_offset -- a uniform offset. > > The function

[RFC PATCH] iommu/arm-smmu: Remove shutdown callback

2020-06-07 Thread Sai Prakash Ranjan
Remove SMMU shutdown callback since it seems to cause more problems than benefits. With this callback, we need to make sure that all clients/consumers of SMMU do not perform any DMA activity once the SMMU is shutdown and translation is disabled. In other words we need to add shutdown callbacks for

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-07 Thread Zhangfei Gao
Hi, Bjorn On 2020/6/6 上午7:19, Bjorn Helgaas wrote: On Thu, Jun 04, 2020 at 09:33:07PM +0800, Zhangfei Gao wrote: On 2020/6/2 上午1:41, Bjorn Helgaas wrote: On Thu, May 28, 2020 at 09:33:44AM +0200, Joerg Roedel wrote: On Wed, May 27, 2020 at 01:18:42PM -0500, Bjorn Helgaas wrote: Is this

[PATCH 2/2] iommu: Add gfp parameter to io_pgtable_ops->map()

2020-06-07 Thread Baolin Wang
Now the ARM page tables are always allocated by GFP_ATOMIC parameter, but the iommu_ops->map() function has been added a gfp_t parameter by commit 781ca2de89ba ("iommu: Add gfp parameter to iommu_ops::map"), thus io_pgtable_ops->map() should use the gfp parameter passed from iommu_ops->map() to

[PATCH 0/2] Some improvements for iommu

2020-06-07 Thread Baolin Wang
Hi, The first patch masks some functions as static, and the second patch changes to use the gfp parameter from iommu_ops->map() to allocate ARM page pages. Any comments are welcome. Thanks. Baolin Wang (2): iommu: Mark __iommu_map/__iommu_map_sg as static iommu: Add gfp parameter to

[PATCH 1/2] iommu: Mark __iommu_map/__iommu_map_sg as static

2020-06-07 Thread Baolin Wang
Now the __iommu_map() and __iommu_map_sg() are used only in iommu.c file, so mark them as static. Signed-off-by: Baolin Wang --- drivers/iommu/iommu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index

RE: [PATCH 2/3] arm64: mm: reserve hugetlb CMA after numa_init

2020-06-07 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Matthias Brugger [mailto:matthias@gmail.com] > Sent: Monday, June 8, 2020 8:15 AM > To: Roman Gushchin ; Song Bao Hua (Barry Song) > > Cc: catalin.mari...@arm.com; John Garry ; > linux-ker...@vger.kernel.org; Linuxarm ; >

Re: [PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-06-07 Thread Lu Baolu
On 6/5/20 9:32 AM, Sai Praneeth Prakhya wrote: Presently, the default domain of an iommu group is allocated during boot time and it cannot be changed later. So, the device would typically be either in identity (also known as pass_through) mode or the device would be in DMA mode as long as the

Re: [PATCH V4 2/3] iommu: Take lock before reading iommu group default domain type

2020-06-07 Thread Lu Baolu
On 6/5/20 9:32 AM, Sai Praneeth Prakhya wrote: "/sys/kernel/iommu_groups//type" file could be read to find out the default domain type of an iommu group. The default domain of an iommu group doesn't change after booting and hence could be read directly. But, after addding support to dynamically

Re: [PATCH V4 3/3] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2020-06-07 Thread Lu Baolu
On 6/5/20 9:32 AM, Sai Praneeth Prakhya wrote: The default domain type of an iommu group can be changed by writing to "/sys/kernel/iommu_groups//type" file. Hence, document it's usage and more importantly spell out its limitations. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: