Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Auger Eric
Hi Will, On 08/11/2016 20:02, Don Dutile wrote: > On 11/08/2016 12:54 PM, Will Deacon wrote: >> On Tue, Nov 08, 2016 at 03:27:23PM +0100, Auger Eric wrote: >>> On 08/11/2016 03:45, Will Deacon wrote: Rather than treat these as separate problems, a better interface is to tell userspace

RE: [PATCH V3 0/8] IOMMU probe deferral support

2016-11-08 Thread Sricharan
Hi Robin, >On 04/11/16 15:16, Sricharan wrote: >> Hi Robin, >> > Yikes, on second look, that definitely shouldn't be happening. > Everything below is probably the resulting fallout. [ 40.206703] vfio-pci :08:00.0: Failed to setup iommu ops I think the above print

[v16, 7/7] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

2016-11-08 Thread Yangbo Lu
The eSDHC of T4240-R1.0-R2.0 has incorrect vender version and spec version. Acturally the right version numbers should be VVN=0x13 and SVN = 0x1. This patch adds the GUTS driver support for eSDHC driver to match SoC. And fix host version to avoid that incorrect version numbers break down the ADMA

[v16, 3/7] soc: fsl: add GUTS driver for QorIQ platforms

2016-11-08 Thread Yangbo Lu
The global utilities block controls power management, I/O device enabling, power-onreset(POR) configuration monitoring, alternate function selection for multiplexed signals,and clock control. This patch adds a driver to manage and access global utilities block. Initially only reading SVR and

[v16, 6/7] base: soc: Check for NULL SoC device attributes

2016-11-08 Thread Yangbo Lu
From: Geert Uytterhoeven If soc_device_match() is used to check the value of a specific attribute that is not present for the current SoC, the kernel crashes with a NULL pointer dereference. Fix this by explicitly checking for the absence of a needed property, and

[v16, 0/7] Fix eSDHC host version register bug

2016-11-08 Thread Yangbo Lu
This patchset is used to fix a host version register bug in the T4240-R1.0-R2.0 eSDHC controller. To match the SoC version and revision, 15 previous version patchsets had tried many methods but all of them were rejected by reviewers. Such as - dts compatible method - syscon method

[v16, 2/7] dt: bindings: move guts devicetree doc out of powerpc directory

2016-11-08 Thread Yangbo Lu
Move guts devicetree doc to Documentation/devicetree/bindings/soc/fsl/ since it's used by not only PowerPC but also ARM. And add a specification for 'little-endian' property. Signed-off-by: Yangbo Lu Acked-by: Rob Herring Acked-by: Scott Wood

[v16, 5/7] base: soc: introduce soc_device_match() interface

2016-11-08 Thread Yangbo Lu
From: Arnd Bergmann We keep running into cases where device drivers want to know the exact version of the a SoC they are currently running on. In the past, this has usually been done through a vendor specific API that can be called by a driver, or by directly accessing some kind

[v16, 4/7] MAINTAINERS: add entry for Freescale SoC drivers

2016-11-08 Thread Yangbo Lu
Add maintainer entry for Freescale SoC drivers including the QE library and the GUTS driver now. Also add maintainer for QE library. Signed-off-by: Yangbo Lu Acked-by: Scott Wood Acked-by: Qiang Zhao Acked-by: Arnd Bergmann

[v16, 1/7] ARM64: dts: ls2080a: add device configuration node

2016-11-08 Thread Yangbo Lu
Add the dts node for device configuration unit that provides general purpose configuration and status for the device. Signed-off-by: Yangbo Lu Acked-by: Scott Wood Acked-by: Arnd Bergmann --- Changes for v5: - Added this patch

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Don Dutile
On 11/08/2016 06:35 PM, Alex Williamson wrote: On Tue, 8 Nov 2016 21:29:22 +0100 Christoffer Dall wrote: Hi Will, On Tue, Nov 08, 2016 at 02:45:59AM +, Will Deacon wrote: Hi all, I figured this was a reasonable post to piggy-back on for the LPC minutes

Re: Summary of LPC guest MSI discussion in Santa Fe (was: Re: [RFC 0/8] KVM PCIe/MSI passthrough on ARM/ARM64 (Alt II))

2016-11-08 Thread Alex Williamson
On Tue, 8 Nov 2016 21:29:22 +0100 Christoffer Dall wrote: > Hi Will, > > On Tue, Nov 08, 2016 at 02:45:59AM +, Will Deacon wrote: > > Hi all, > > > > I figured this was a reasonable post to piggy-back on for the LPC minutes > > relating to guest MSIs on arm64.

Re: [PATCH v4 2/2] iommu/exynos: Add proper runtime pm support

2016-11-08 Thread Luis R. Rodriguez
On Mon, Oct 10, 2016 at 03:32:06PM +0200, Marek Szyprowski wrote: > Hi Luis > > > On 2016-10-06 19:37, Luis R. Rodriguez wrote: > > On Thu, Sep 29, 2016 at 10:12:31AM +0200, Marek Szyprowski wrote: > > > This patch uses recently introduced device links to track the runtime pm > > > state of the

Re: Summary of LPC guest MSI discussion in Santa Fe (was: Re: [RFC 0/8] KVM PCIe/MSI passthrough on ARM/ARM64 (Alt II))

2016-11-08 Thread Christoffer Dall
Hi Will, On Tue, Nov 08, 2016 at 02:45:59AM +, Will Deacon wrote: > Hi all, > > I figured this was a reasonable post to piggy-back on for the LPC minutes > relating to guest MSIs on arm64. > > On Thu, Nov 03, 2016 at 10:02:05PM -0600, Alex Williamson wrote: > > We can always have QEMU

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Will Deacon
On Tue, Nov 08, 2016 at 02:02:39PM -0500, Don Dutile wrote: > On 11/08/2016 12:54 PM, Will Deacon wrote: > >A first step would be making all this opt-in, and only supporting GICv3 > >ITS for now. > You're trying to support a config that is < GICv3 and no ITS ? ... > That would be the equiv. of x86

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Don Dutile
On 11/08/2016 12:54 PM, Will Deacon wrote: On Tue, Nov 08, 2016 at 03:27:23PM +0100, Auger Eric wrote: On 08/11/2016 03:45, Will Deacon wrote: Rather than treat these as separate problems, a better interface is to tell userspace about a set of reserved regions, and have this include the MSI

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Will Deacon
On Tue, Nov 08, 2016 at 03:27:23PM +0100, Auger Eric wrote: > On 08/11/2016 03:45, Will Deacon wrote: > > Rather than treat these as separate problems, a better interface is to > > tell userspace about a set of reserved regions, and have this include > > the MSI doorbell, irrespective of whether

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Don Dutile
On 11/07/2016 09:45 PM, Will Deacon wrote: Hi all, I figured this was a reasonable post to piggy-back on for the LPC minutes relating to guest MSIs on arm64. On Thu, Nov 03, 2016 at 10:02:05PM -0600, Alex Williamson wrote: We can always have QEMU reject hot-adding the device if the reserved

Re: [v15, 3/7] powerpc/fsl: move mpc85xx.h to include/linux/fsl

2016-11-08 Thread Arnd Bergmann
On Tuesday, November 8, 2016 6:49:51 AM CET Y.B. Lu wrote: > Hi Arnd, > > > > -Original Message- > > From: Arnd Bergmann [mailto:a...@arndb.de] > > Sent: Tuesday, November 08, 2016 5:20 AM > > To: Y.B. Lu > > Cc: linuxppc-...@lists.ozlabs.org; linux-...@vger.kernel.org; > >

[git pull] IOMMU Fixes for Linux v4.9-rc4

2016-11-08 Thread Joerg Roedel
Hi Linus, The following changes since commit bc33b0ca11e3df46a4fa7639ba488c9d4911: Linux 4.9-rc4 (2016-11-05 16:23:36 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v4.9-rc4 for you to fetch changes up to

Re: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm

2016-11-08 Thread Lukas Wunner
On Tue, Nov 08, 2016 at 08:27:12AM +0100, Marek Szyprowski wrote: > On 2016-11-07 22:47, Luis R. Rodriguez wrote: > > Has there been any review of the existing similar solutions out there > > such as the DRM / audio component framework? Would that help ? > > Nope, none of that solution deals with

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Marek Szyprowski
Hi Robin, On 2016-11-08 15:44, Robin Murphy wrote: On 08/11/16 13:41, Marek Szyprowski wrote: On 2016-11-08 12:37, Robin Murphy wrote: On 07/11/16 13:06, Marek Szyprowski wrote: When one called iommu_dma_init_domain() with size smaller than device's DMA mask, the alloc_iova() will not

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Robin Murphy
On 08/11/16 13:41, Marek Szyprowski wrote: > Hi Robin, > > > On 2016-11-08 12:37, Robin Murphy wrote: >> On 07/11/16 13:06, Marek Szyprowski wrote: >>> When one called iommu_dma_init_domain() with size smaller than device's >>> DMA mask, the alloc_iova() will not respect it and always assume

Re: Summary of LPC guest MSI discussion in Santa Fe

2016-11-08 Thread Auger Eric
Hi Will, On 08/11/2016 03:45, Will Deacon wrote: > Hi all, > > I figured this was a reasonable post to piggy-back on for the LPC minutes > relating to guest MSIs on arm64. > > On Thu, Nov 03, 2016 at 10:02:05PM -0600, Alex Williamson wrote: >> We can always have QEMU reject hot-adding the

[PATCH] iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path

2016-11-08 Thread Joerg Roedel
On Fri, Nov 04, 2016 at 10:38:29AM +0100, Iago Abal wrote: > That patch was actually my first attempt at fixing the problem, but I > ran the tool and I found a second possibility of deadlock: > `domain_exit' calls to `domain_remove_dev_info', which also spin_locks > on `device_domain_lock'. > >

[PATCH v6 3/7] iommu/exynos: Simplify internal enable/disable functions

2016-11-08 Thread Marek Szyprowski
Remove remaining leftovers of the ref-count related code in the __sysmmu_enable/disable functions inline __sysmmu_enable/disable_nocount to them. Suspend/resume callbacks now checks if master device is set for given SYSMMU controller instead of relying on the activation count. Signed-off-by:

[PATCH v6 6/7] iommu/exynos: Add runtime pm support

2016-11-08 Thread Marek Szyprowski
This patch adds runtime pm implementation, which is based on previous suspend/resume code. SYSMMU controller is now being enabled/disabled mainly from the runtime pm callbacks. System sleep callbacks relies on generic pm_runtime_force_suspend/pm_runtime_force_resume helpers. To ensure internal

[PATCH v6 4/7] iommu/exynos: Set master device once on boot

2016-11-08 Thread Marek Szyprowski
To avoid possible races, set master device pointer in each SYSMMU controller once on boot. Suspend/resume callbacks now properly relies on the configured iommu domain to enable or disable SYSMMU controller. While changing the code, also update the sleep debug messages and make them conditional.

[PATCH v6 5/7] iommu/exynos: Rework and fix internal locking

2016-11-08 Thread Marek Szyprowski
This patch reworks locking in the exynos_iommu_attach/detach_device functions to ensure that all entries of the sysmmu_drvdata and exynos_iommu_owner structure are updated under the respective spinlocks, while runtime pm functions are called without any spinlocks held. Signed-off-by: Marek

[PATCH v6 0/7] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-11-08 Thread Marek Szyprowski
Hello, This is another update of the patchset for adding proper runtime PM support to Exynos IOMMU driver. This has been achieved by using recently introduced device links, which lets SYSMMU controller's runtime PM to follow master's device runtime PM state (the device which actually performs DMA

[PATCH v6 1/7] iommu/exynos: Remove excessive, useless debug

2016-11-08 Thread Marek Szyprowski
Remove excessive, useless debug about skipping TLB invalidation, which is a normal situation when more aggressive power management is enabled. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Robin Murphy
Hi Marek, On 07/11/16 13:06, Marek Szyprowski wrote: > When one called iommu_dma_init_domain() with size smaller than device's > DMA mask, the alloc_iova() will not respect it and always assume that all > IOVA addresses will be allocated from the the (base ... dev->dma_mask) range. Is that