RE: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread Bhushan Bharat-R65777
> -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, October 09, 2013 4:27 AM > To: Bhushan Bharat-R65777 > Cc: alex.william...@redhat.com; j...@8bytes.org; b...@kernel.crashing.org; > ga...@kernel.crashing.org; linux-ker...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org;

Re: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread Scott Wood
On Tue, 2013-10-08 at 17:25 -0600, Bjorn Helgaas wrote: > >> - u32 msiir_offset; /* Offset of MSIIR, relative to start of CCSR */ > >> + dma_addr_t msiir; /* MSIIR Address in CCSR */ > > > > Are you sure dma_addr_t is right here, versus phys_addr_t? It implies > > that it's the output of t

Re: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread Bjorn Helgaas
>> - u32 msiir_offset; /* Offset of MSIIR, relative to start of CCSR */ >> + dma_addr_t msiir; /* MSIIR Address in CCSR */ > > Are you sure dma_addr_t is right here, versus phys_addr_t? It implies > that it's the output of the DMA API, but I don't think the DMA API is > used in the MSI dri

Re: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread Scott Wood
On Thu, 2013-09-19 at 12:59 +0530, Bharat Bhushan wrote: > @@ -376,6 +405,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) > int len; > u32 offset; > static const u32 all_avail[] = { 0, NR_MSI_IRQS }; > + static int bank_index; > > match = of_match_device(

Re: [PATCH 3/5] iommu/arm-smmu: Introduce stream ID masking

2013-10-08 Thread Rob Herring
On 10/08/2013 11:59 AM, Will Deacon wrote: > On Tue, Oct 08, 2013 at 05:40:21PM +0100, Andreas Herrmann wrote: >> On Tue, Oct 08, 2013 at 05:20:08PM +0200, Andreas Herrmann wrote: >> To be more specific: For SATA I'd need to specify 10 StreamIds. This >> would >> >> (1) exceed MAX_MASTER_STREAMIDS

RE: [PATCH 3/5] iommu/arm-smmu: Introduce stream ID masking

2013-10-08 Thread Sethi Varun-B16395
> -Original Message- > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > boun...@lists.linux-foundation.org] On Behalf Of Will Deacon > Sent: Tuesday, October 08, 2013 10:29 PM > To: Andreas Herrmann > Cc: iommu@lists.linux-foundation.org; Rob Herring; linux-arm- > ker...@li

RE: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread Bhushan Bharat-R65777
> -Original Message- > From: j...@8bytes.org [mailto:j...@8bytes.org] > Sent: Tuesday, October 08, 2013 10:32 PM > To: Bjorn Helgaas > Cc: Bhushan Bharat-R65777; alex.william...@redhat.com; > b...@kernel.crashing.org; > ga...@kernel.crashing.org; linux-ker...@vger.kernel.org; linuxppc- >

Re: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread Scott Wood
On Tue, 2013-10-08 at 10:47 -0600, Bjorn Helgaas wrote: > On Thu, Oct 3, 2013 at 11:19 PM, Bhushan Bharat-R65777 > wrote: > > >> I don't know enough about VFIO to understand why these new interfaces are > >> needed. Is this the first VFIO IOMMU driver? I see > >> vfio_iommu_spapr_tce.c and > >

Re: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread j...@8bytes.org
On Tue, Oct 08, 2013 at 10:47:49AM -0600, Bjorn Helgaas wrote: > I still have no idea what an "aperture type IOMMU" is, > other than that it is "different." An aperture based IOMMU is basically any GART-like IOMMU which can only remap a small window (the aperture) of the DMA address space. DMA out

Re: [PATCH 3/5] iommu/arm-smmu: Introduce stream ID masking

2013-10-08 Thread Will Deacon
On Tue, Oct 08, 2013 at 05:40:21PM +0100, Andreas Herrmann wrote: > On Tue, Oct 08, 2013 at 05:20:08PM +0200, Andreas Herrmann wrote: > To be more specific: For SATA I'd need to specify 10 StreamIds. This > would > > (1) exceed MAX_MASTER_STREAMIDS (currently it's 8) > >(Can easily be fixed b

Re: [PATCH 1/7] powerpc: Add interface to get msi region information

2013-10-08 Thread Bjorn Helgaas
On Thu, Oct 3, 2013 at 11:19 PM, Bhushan Bharat-R65777 wrote: >> I don't know enough about VFIO to understand why these new interfaces are >> needed. Is this the first VFIO IOMMU driver? I see vfio_iommu_spapr_tce.c >> and >> vfio_iommu_type1.c but I don't know if they're comparable to the Fre

Re: [PATCH 3/5] iommu/arm-smmu: Introduce stream ID masking

2013-10-08 Thread Andreas Herrmann
On Tue, Oct 08, 2013 at 05:20:08PM +0200, Andreas Herrmann wrote: > On Tue, Oct 08, 2013 at 11:10:07AM -0400, Will Deacon wrote: > > On Tue, Oct 08, 2013 at 10:27:22AM +0100, Andreas Herrmann wrote: > > > Ie. use a mask based on smr_mask_bits to map all stream IDs of an SMMU > > > to one context. >

Re: [PATCH 3/5] iommu/arm-smmu: Introduce stream ID masking

2013-10-08 Thread Andreas Herrmann
On Tue, Oct 08, 2013 at 11:10:07AM -0400, Will Deacon wrote: > On Tue, Oct 08, 2013 at 10:27:22AM +0100, Andreas Herrmann wrote: > > Ie. use a mask based on smr_mask_bits to map all stream IDs of an SMMU > > to one context. > > > > This behaviour is controlled per SMMU node with DT property > > "a

Re: [PATCH 1/5] iommu/arm-smmu: Introduce driver option handling

2013-10-08 Thread Andreas Herrmann
On Tue, Oct 08, 2013 at 11:06:13AM -0400, Will Deacon wrote: > On Tue, Oct 08, 2013 at 10:27:20AM +0100, Andreas Herrmann wrote: > > Introduce handling of driver options. Options are set based on DT > > information when probing an SMMU device. The first option introduced > > is "arm,smmu-isolate-de

Re: [PATCH 3/5] iommu/arm-smmu: Introduce stream ID masking

2013-10-08 Thread Will Deacon
On Tue, Oct 08, 2013 at 10:27:22AM +0100, Andreas Herrmann wrote: > Ie. use a mask based on smr_mask_bits to map all stream IDs of an SMMU > to one context. > > This behaviour is controlled per SMMU node with DT property > "arm,smmu-mask-stream-ids" and is only allowed if just a single master > is

Re: [PATCH 1/5] iommu/arm-smmu: Introduce driver option handling

2013-10-08 Thread Will Deacon
On Tue, Oct 08, 2013 at 10:27:20AM +0100, Andreas Herrmann wrote: > Introduce handling of driver options. Options are set based on DT > information when probing an SMMU device. The first option introduced > is "arm,smmu-isolate-devices". (It will be used in the bus notifier > block.) > > Signed-of

Re: [PATCH 2/2] iommu/tegra-smmu: Staticize tegra_smmu_pm_ops

2013-10-08 Thread Hiroshi Doyu
On Tue, 8 Oct 2013 12:51:04 +0200 Sachin Kamat wrote: > 'tegra_smmu_pm_ops' is used only in this file. Make it static. > > Signed-off-by: Sachin Kamat Acked-by: Hiroshi Doyu ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linux

Re: [PATCH 1/2] iommu/tegra-gart: Staticize tegra_gart_pm_ops

2013-10-08 Thread Hiroshi Doyu
On Tue, 8 Oct 2013 12:51:03 +0200 Sachin Kamat wrote: > 'tegra_gart_pm_ops' is local to this file. Make it static. > > Signed-off-by: Sachin Kamat Acked-by: Hiroshi Doyu ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoun

[PATCH 1/2] iommu/tegra-gart: Staticize tegra_gart_pm_ops

2013-10-08 Thread Sachin Kamat
'tegra_gart_pm_ops' is local to this file. Make it static. Signed-off-by: Sachin Kamat --- drivers/iommu/tegra-gart.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index f75483a..dba1a9f 100644 --- a/drivers/iommu/t

[PATCH 2/2] iommu/tegra-smmu: Staticize tegra_smmu_pm_ops

2013-10-08 Thread Sachin Kamat
'tegra_smmu_pm_ops' is used only in this file. Make it static. Signed-off-by: Sachin Kamat --- drivers/iommu/tegra-smmu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index 34374b3..605b5b4 100644 --- a/drivers/iom

Re: [PATCH 1/1] iommu: arm-smmu: Use devm_ioremap_resource

2013-10-08 Thread Will Deacon
On Tue, Oct 08, 2013 at 11:42:35AM +0100, Sachin Kamat wrote: > devm_request_and_ioremap is deprecated. Use devm_ioremap_resource > instead. I already have an identical patch from Julia, queued for 3.13. Thanks, Will ___ iommu mailing list iommu@lists.

[PATCH 1/1] iommu: arm-smmu: Use devm_ioremap_resource

2013-10-08 Thread Sachin Kamat
devm_request_and_ioremap is deprecated. Use devm_ioremap_resource instead. Signed-off-by: Sachin Kamat --- drivers/iommu/arm-smmu.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 181c9ba..b564930 100644 --- a

Re: [PATCH 7/9] iommu/arm-smmu: Add function that conditionally isolates all masters of all SMMUs

2013-10-08 Thread Will Deacon
On Mon, Oct 07, 2013 at 04:42:27PM +0100, Andreas Herrmann wrote: > On Fri, Sep 27, 2013 at 09:00:01AM -0400, Will Deacon wrote: > > On Thu, Sep 26, 2013 at 11:36:19PM +0100, Andreas Herrmann wrote: > > > + list_for_each_entry(smmu, &arm_smmu_devices, list) { > > > + if (arm_smmu_disable_is

[PATCH] documentation/iommu: Update description of ARM System MMU binding

2013-10-08 Thread Andreas Herrmann
This patch adds descriptions fore new properties of device tree binding for the ARM SMMU architecture. These properties control arm-smmu driver options. Cc: Rob Herring Cc: Grant Likely Cc: Will Deacon Signed-off-by: Andreas Herrmann --- .../devicetree/bindings/iommu/arm,smmu.txt |

[PATCH 0/5] iommu/arm-smmu: Misc modifications to support SMMUs on Calxeda ECX-2000

2013-10-08 Thread Andreas Herrmann
Hi Will, Here is a reworked patch set - to introduce device isolation (using bus-notifier). - to work around secure-only config access to SMMU registers - (new) to support masking of all streamIDs for an SMMU - add DT information for SMMUs on Calxeda ECX-2000 I've also separated out the introduct

[PATCH 4/5] iommu/arm-smmu: Support buggy implementations where all config accesses are secure

2013-10-08 Thread Andreas Herrmann
In such a case we have to use secure aliases of some non-secure registers. This handling is switched on by DT property "arm,smmu-secure-config-access" for an SMMU node. Signed-off-by: Andreas Herrmann --- drivers/iommu/arm-smmu.c | 30 +- 1 file changed, 21 inserti

[PATCH 2/5] iommu/arm-smmu: Introduce bus notifier block

2013-10-08 Thread Andreas Herrmann
At the moment just handle BUS_NOTIFY_BIND_DRIVER to conditionally isolate all master devices for an SMMU. Depending on DT information each device is put into its own protection domain (if possible). For configuration with one or just a few masters per SMMU that is easy to achieve. In case of man

[PATCH 1/5] iommu/arm-smmu: Introduce driver option handling

2013-10-08 Thread Andreas Herrmann
Introduce handling of driver options. Options are set based on DT information when probing an SMMU device. The first option introduced is "arm,smmu-isolate-devices". (It will be used in the bus notifier block.) Signed-off-by: Andreas Herrmann --- drivers/iommu/arm-smmu.c | 49 +

[PATCH 5/5] ARM: dts: Add nodes for SMMUs on Calxeda ECX-2000

2013-10-08 Thread Andreas Herrmann
Signed-off-by: Andreas Herrmann --- arch/arm/boot/dts/ecx-2000.dts| 45 +++-- arch/arm/boot/dts/ecx-common.dtsi |9 +--- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/ecx-2000.dts b/arch/arm/boot/dts/ecx-2000.dts in

[PATCH 3/5] iommu/arm-smmu: Introduce stream ID masking

2013-10-08 Thread Andreas Herrmann
Ie. use a mask based on smr_mask_bits to map all stream IDs of an SMMU to one context. This behaviour is controlled per SMMU node with DT property "arm,smmu-mask-stream-ids" and is only allowed if just a single master is attached to an SMMU. If the option is specified, all stream-ids that are prov