Re: [PATCH 1/5] iommu/tegra: smmu: Add DMA window parser, of_get_dma_window()

2012-06-20 Thread Stephen Warren
On 06/21/2012 12:46 AM, Hiroshi Doyu wrote: ... > There are the following 3 users of of_parse_dma_window() as below. All > of them are IOMMU related, but they are architecture specific ones, > not for the standard IOMMU API. I guess that the current trend is to > convert Arch specific IOMMU API to

Re: [PATCH 1/5] iommu/tegra: smmu: Add DMA window parser, of_get_dma_window()

2012-06-20 Thread Hiroshi Doyu
Stephen Warren wrote @ Wed, 20 Jun 2012 19:11:51 +0200: > On 06/20/2012 01:16 AM, Hiroshi DOYU wrote: > > From: Hiroshi Doyu > > > > This code was based on: > > "arch/microblaze/kernel/prom_parse.c" > > "arch/powerpc/kernel/prom_parse.c" > > > > Can be promoted as a global function for

Re: [PATCH v2 2/7] iommu: IOMMU Groups

2012-06-20 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 10:48 -0600, Alex Williamson wrote: > Yes, I was assuming the caller held a reference to the struct device to > prevent such a race, looks like I forgot to document that in the > comments. I'll have to think about if we can fix the ordering problem. > We can re-order the lis

Re: [PATCH 1/5] iommu/tegra: smmu: Add DMA window parser, of_get_dma_window()

2012-06-20 Thread Stephen Warren
On 06/20/2012 01:16 AM, Hiroshi DOYU wrote: > From: Hiroshi Doyu > > This code was based on: > "arch/microblaze/kernel/prom_parse.c" > "arch/powerpc/kernel/prom_parse.c" > > Can be promoted as a global function for general use to replace > "of_parse_dma_window()" in the above. This suppo

Re: [PATCH v2 2/7] iommu: IOMMU Groups

2012-06-20 Thread Alex Williamson
On Wed, 2012-06-20 at 20:01 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-05-30 at 14:18 -0600, Alex Williamson wrote: > > > IOMMU groups also include a userspace representation in sysfs under > > /sys/kernel/iommu_groups. When allocated, each group is given a > > dynamically assign ID (int

Re: [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource

2012-06-20 Thread Stephen Warren
On 06/20/2012 01:04 AM, Hiroshi DOYU wrote: > From: Hiroshi DOYU > > GART Register/Aperture range should be reserved. > > Signed-off-by: Hiroshi DOYU > Cc: Thierry Reding > Cc: Lucas Stach Acked-by: Stephen Warren ___ iommu mailing list iommu@list

Re: [PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*()

2012-06-20 Thread Stephen Warren
On 06/20/2012 01:04 AM, Hiroshi DOYU wrote: > From: Hiroshi DOYU > > Remove unnecessary cleanup procedures with devm_*(). > > Signed-off-by: Hiroshi DOYU > Reviewed-by: Thierry Reding > Cc: Lucas Stach Acked-by: Stephen Warren ___ iommu mailing li

Re: [PATCH v2 2/7] iommu: IOMMU Groups

2012-06-20 Thread Benjamin Herrenschmidt
On Wed, 2012-05-30 at 14:18 -0600, Alex Williamson wrote: > IOMMU groups also include a userspace representation in sysfs under > /sys/kernel/iommu_groups. When allocated, each group is given a > dynamically assign ID (int). The ID is managed by the core IOMMU group > code to support multiple he

[PATCH 5/5] iommu/tegra: smmu: Fix uninitialized var warning

2012-06-20 Thread Hiroshi DOYU
From: Hiroshi Doyu From: Hiroshi Doyu For the compiler warning, uninitizlized var when getting value by a pointer. Signed-off-by: Hiroshi DOYU --- drivers/iommu/tegra-smmu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu

[PATCH 2/5] iommu/tegra: smmu: Add device tree support for SMMU

2012-06-20 Thread Hiroshi DOYU
From: Hiroshi Doyu From: Hiroshi Doyu The necessary info is expected to pass from DT. For more precise resource reservation, there shouldn't be any overlapping of register range between SMMU and MC. SMMU register offset needs to be calculated correctly, based on its register bank. Signed-off-

[PATCH 4/5] iommu/tegra: smmu: Remove unnecessary cleanups with devm_*()

2012-06-20 Thread Hiroshi DOYU
From: Hiroshi Doyu From: Hiroshi Doyu Remove unnecessary cleanup procedures with devm_*() functions. Signed-off-by: Hiroshi DOYU Acked-by: Stephen Warren --- drivers/iommu/tegra-smmu.c | 37 ++--- 1 files changed, 6 insertions(+), 31 deletions(-) diff --gi

[PATCH 3/5] iommu/tegra: smmu: Simplify allocation at once

2012-06-20 Thread Hiroshi DOYU
From: Hiroshi Doyu From: Hiroshi Doyu To simplify the code, alloc necessary data at once. Signed-off-by: Hiroshi DOYU Acked-by: Stephen Warren --- drivers/iommu/tegra-smmu.c | 29 + 1 files changed, 9 insertions(+), 20 deletions(-) diff --git a/drivers/iommu/t

[PATCH 1/5] iommu/tegra: smmu: Add DMA window parser, of_get_dma_window()

2012-06-20 Thread Hiroshi DOYU
From: Hiroshi Doyu This code was based on: "arch/microblaze/kernel/prom_parse.c" "arch/powerpc/kernel/prom_parse.c" Can be promoted as a global function for general use to replace "of_parse_dma_window()" in the above. This supports different formats flexibly. "prefix" can be configured i

[PATCH 2/2] iommu/tegra: gart: Reserve iomem resource

2012-06-20 Thread Hiroshi DOYU
From: Hiroshi DOYU GART Register/Aperture range should be reserved. Signed-off-by: Hiroshi DOYU Cc: Thierry Reding Cc: Lucas Stach --- drivers/iommu/tegra-gart.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-g

[PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*()

2012-06-20 Thread Hiroshi DOYU
From: Hiroshi DOYU Remove unnecessary cleanup procedures with devm_*(). Signed-off-by: Hiroshi DOYU Reviewed-by: Thierry Reding Cc: Lucas Stach --- drivers/iommu/tegra-gart.c | 22 +++--- 1 files changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/iommu/tegra-ga