Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-04 Thread Olav Haugan
Any more comments on this from anyone before I submit v5? On 8/1/2014 9:44 AM, Olav Haugan wrote: > Hi Will, > > On 8/1/2014 1:22 AM, Will Deacon wrote: >> Hi Olav, >> >> On Fri, Aug 01, 2014 at 01:54:44AM +0100, Olav Haugan wrote: >>> Mapping and unmapping are more often than not in the critical

[PATCH v2 0/2] arm-smmu fixes for CBn_TCR and S2CR/SMR programming

2014-08-04 Thread Olav Haugan
Here are a couple fixes for the arm smmu driver. The first one deals with ensuring that we program CBn_TCR correctly when we are programming a stage-1 context bank. The second patch ensures that SMR registers are not touched when stream matchign is not supported by the hardware. When stream id matc

[PATCH v2 2/2] iommu/arm-smmu: Do not access non-existing SMR registers

2014-08-04 Thread Olav Haugan
The SMR registers do not exist when stream matching is not supported by the hardware. Avoid writing to this register if not needed. Signed-off-by: Olav Haugan --- drivers/iommu/arm-smmu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/i

[PATCH v2 1/2] iommu/arm-smmu: Fix programming of SMMU_CBn_TCR for stage 1

2014-08-04 Thread Olav Haugan
Stage-1 context bank does not have SMMU_CBn_TCR[SL0] field. SL0 field is only applicable to stage-2 context banks. Signed-off-by: Olav Haugan --- drivers/iommu/arm-smmu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.

[PATCH v2] iommu: exynos: Fix trivial typos

2014-08-04 Thread Sachin Kamat
Fixed trivial typos and grammar to improve readability. Changed w/a to workaround. Signed-off-by: Sachin Kamat --- drivers/iommu/exynos-iommu.c | 51 ++-- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/driver

Re: [PATCH] iommu/vt-d: Do not BUG_ON in intel_unmap if no domain

2014-08-04 Thread Joerg Roedel
On Mon, Aug 04, 2014 at 01:42:05PM +0200, Borislav Petkov wrote: > It is always questionable when people remove BUG_ONs because relaxing > assertions sound like a temporary fix more often than not. Sounds to me > that the original commit which deals with BUS_NOTIFY_DEL_DEVICE needs to > try again w

[PATCH 1/1] iommu: exynos: Fix trivial typos

2014-08-04 Thread Sachin Kamat
Fixed trivial typos and grammar to improve readability. Signed-off-by: Sachin Kamat --- drivers/iommu/exynos-iommu.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index d037e87..327ebec 100

[PATCH] iommu/msm: Switch to using managed resources

2014-08-04 Thread Pramod Gurav
This switches the driver to using managed resources to simplify error handling and to do away with remove function. CC: Stepan Moskovchenko CC: Joerg Roedel CC: Stephen Boyd Signed-off-by: Pramod Gurav --- drivers/iommu/msm_iommu_dev.c | 76 +++-- 1 file

Re: [PATCH v1 1/2] iommu/arm-smmu: Fix programming of SMMU_CBn_TCR for stage 1

2014-08-04 Thread Olav Haugan
On 8/4/2014 2:41 AM, Will Deacon wrote: > Hi Olav, > > On Mon, Aug 04, 2014 at 01:47:43AM +0100, Olav Haugan wrote: >> Stage-1 context bank does not have SMMU_CBn_TCR[SL0] field. SL0 field >> is only applicable to stage-2 context banks. > > Ha, I actually noticed this last week but didn't get aro

Re: [PATCH] iommu/vt-d: Do not BUG_ON in intel_unmap if no domain

2014-08-04 Thread Borislav Petkov
On Mon, Aug 04, 2014 at 01:23:06PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > This BUG_ON is easy to trigger with device-hotplug (e.g. > SR-IOV). The device_notifier function in the Intel IOMMU > driver listens to the BUS_NOTIFY_DEL_DEVICE event and frees > the domain for the device if i

[PATCH] iommu/vt-d: Do not BUG_ON in intel_unmap if no domain

2014-08-04 Thread Joerg Roedel
From: Joerg Roedel This BUG_ON is easy to trigger with device-hotplug (e.g. SR-IOV). The device_notifier function in the Intel IOMMU driver listens to the BUS_NOTIFY_DEL_DEVICE event and frees the domain for the device if it is reveived. But this event is triggered before the device driver is un

Re: [PATCH] iommu/amd: Implement syscore_ops.shutdown()

2014-08-04 Thread Borislav Petkov
On Sat, Aug 02, 2014 at 10:25:39AM +0800, Jiang Liu wrote: > During hibernation or shutdown, AMD iommu generates warnings on some > platforms as below: > [ 89.089832] AMD-Vi: Event logged [IO_PAGE_FAULT device=00:12.0 > domain=0x0009 address=0x0080 flags=0x0020] > [ 89.102239] AMD-

Re: [PATCH v1 2/2] iommu/arm-smmu: Correctly program S2CR and SMR registers

2014-08-04 Thread Will Deacon
On Mon, Aug 04, 2014 at 01:47:44AM +0100, Olav Haugan wrote: > When stream matching is supported by the hardware the S2CR is indexed > by the stream matching register group index and not the stream id. > Fix the programming of the S2CR register to ensure it is programmed > correctly in both cases.

Re: [PATCH v1 1/2] iommu/arm-smmu: Fix programming of SMMU_CBn_TCR for stage 1

2014-08-04 Thread Will Deacon
Hi Olav, On Mon, Aug 04, 2014 at 01:47:43AM +0100, Olav Haugan wrote: > Stage-1 context bank does not have SMMU_CBn_TCR[SL0] field. SL0 field > is only applicable to stage-2 context banks. Ha, I actually noticed this last week but didn't get around to writing a a fix. Thanks for taking a look! >