Re: [PATCH 6/6] iommu/arm-smmu: Make use of phandle iterators in device-tree parsing

2016-03-22 Thread Robin Murphy
Hi Joerg, On 22/03/16 17:58, Joerg Roedel wrote: From: Joerg Roedel Remove the usage of of_parse_phandle_with_args() and replace it by the phandle-iterator implementation so that we can parse out all of the potentially present 128 stream-ids. In a stream-matching implementation, a device may

Re: [PATCH 0/6] of: Implement iterator for phandles

2016-03-22 Thread Rob Herring
On Tue, Mar 22, 2016 at 12:58 PM, Joerg Roedel wrote: > Hi, > > here is an implementation of the iterator over phandles > concept which Rob Herring suggested to me some time ago. My > approach is a little bit different from what the diff showed > back then, but it gets rid of the allocation and 's

Re: [PATCH 6/6] iommu/arm-smmu: Make use of phandle iterators in device-tree parsing

2016-03-22 Thread Rob Herring
On Tue, Mar 22, 2016 at 12:58 PM, Joerg Roedel wrote: > From: Joerg Roedel > > Remove the usage of of_parse_phandle_with_args() and replace > it by the phandle-iterator implementation so that we can > parse out all of the potentially present 128 stream-ids. > > Signed-off-by: Joerg Roedel > ---

[PATCH 6/6] iommu/arm-smmu: Make use of phandle iterators in device-tree parsing

2016-03-22 Thread Joerg Roedel
From: Joerg Roedel Remove the usage of of_parse_phandle_with_args() and replace it by the phandle-iterator implementation so that we can parse out all of the potentially present 128 stream-ids. Signed-off-by: Joerg Roedel --- drivers/iommu/arm-smmu.c | 28 ++-- 1 file c

[PATCH 3/6] of: Remove counting special case from __of_parse_phandle_with_args()

2016-03-22 Thread Joerg Roedel
From: Joerg Roedel The index = -1 case in __of_parse_phandle_with_args() is used to just return the number of phandles. That special case needs extra handling, so move it to the place where it is needed: of_count_phandle_with_args(). This allows to further simplify __of_parse_phandle_with_args()

[PATCH 5/6] of: Introduce of_phandle_iterator_args()

2016-03-22 Thread Joerg Roedel
From: Joerg Roedel This helper function can be used to copy the arguments of a phandle to an array. Signed-off-by: Joerg Roedel --- drivers/of/base.c | 29 +++-- include/linux/of.h | 10 ++ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 4/6] of: Introduce of_for_each_phandle() helper macro

2016-03-22 Thread Joerg Roedel
From: Joerg Roedel With this macro any user can easily iterate over a list of phandles. The patch also converts __of_parse_phandle_with_args() to make use of the macro. The of_count_phandle_with_args() function is not converted, because the macro hides the return value of of_phandle_iterator_ini

[PATCH 2/6] of: Move phandle walking to of_phandle_iterator_next()

2016-03-22 Thread Joerg Roedel
From: Joerg Roedel Move the code to walk over the phandles out of the loop in __of_parse_phandle_with_args() to a separate function that just works with the iterator handle: of_phandle_iterator_next(). Signed-off-by: Joerg Roedel --- drivers/of/base.c | 130 ++-

[PATCH 1/6] of: Introduce struct of_phandle_iterator

2016-03-22 Thread Joerg Roedel
From: Joerg Roedel This struct carrys all necessary information to iterate over a list of phandles and extract the arguments. Add an init-function for the iterator and make use of it in __of_parse_phandle_with_args(). Signed-off-by: Joerg Roedel --- drivers/of/base.c | 99

[PATCH 0/6] of: Implement iterator for phandles

2016-03-22 Thread Joerg Roedel
Hi, here is an implementation of the iterator over phandles concept which Rob Herring suggested to me some time ago. My approach is a little bit different from what the diff showed back then, but it gets rid of the allocation and 'struct 'struct of_phandle_args' misuse. I also converted the arm-s

Re: [PATCH 1/2] of: Implement iterator for phandles

2016-03-22 Thread Joerg Roedel
Hi Rob, On Fri, Mar 18, 2016 at 10:54:57AM -0500, Rob Herring wrote: > This mostly looks fine to me, but it is kind of a lot of functions > just for this one thing. For example, I think the caller can track the > index themselves if they care about it. I'd also like to see a more > standard style

Re: [PATCH] arm64/dma-mapping: Add DMA_ATTR_ALLOC_SINGLE_PAGES support

2016-03-22 Thread Doug Anderson
Will, On Mon, Mar 21, 2016 at 11:01 AM, Will Deacon wrote: > On Thu, Mar 03, 2016 at 02:54:26AM +0800, 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 alloca

[PATCH] iommu/rockchip: Only log stall errors when attaching

2016-03-22 Thread Tomeu Vizoso
Move the logging of timeouts when stalling the MMU to rk_iommu_attach_device, as it's expected that sometimes the MMU won't get stalled when detaching a device, and it's not a real problem that would need to be communicated to the user. Signed-off-by: Tomeu Vizoso --- drivers/iommu/rockchip-iomm

RE: [PATCH 0/7] PAMU driver update

2016-03-22 Thread Codrin Constantin Ciubotariu
Hi, Anyone has any comments on this patch-set? Please share your thoughts. Thanks and best regards, Codrin > -Original Message- > From: Codrin Ciubotariu [mailto:codrin.ciubota...@nxp.com] > Sent: Monday, 07 March, 2016 5:34 PM > To: iommu@lists.linux-foundation.org > Cc: scottw...@frees

[git pull] IOMMU Updates for Linux v4.6

2016-03-22 Thread Joerg Roedel
Hi Linus, The following changes since commit b562e44f507e863c6792946e4e1b1449fbbac85d: Linux 4.5 (2016-03-13 21:28:54 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-updates-v4.6 for you to fetch changes up to 70cf769c