[PATCH] iommu/mediatek: Move attach_device after iommu-group is ready for M4Uv1

2018-01-19 Thread Yong Wu
In the commit 05f80300dc8b, the iommu framework has supposed all the iommu drivers have their owner iommu-group, it get rid of the FIXME workarounds while the group is NULL. But the flow of Mediatek M4U gen1 looks a bit trick that it will hang at this case:

[PATCH] IPMMU-VMSA: Delete an error message for a failed memory allocation in ipmmu_probe()

2018-01-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 Jan 2018 22:22:38 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/iommu/ipmmu-vmsa.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH] IOMMU-Tegra: gart: Delete two error messages for a failed memory allocation in tegra_gart_probe()

2018-01-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 Jan 2018 21:44:31 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/iommu/tegra-gart.c | 8 ++-- 1 file changed, 2 insertions(+)

Re: [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2018-01-19 Thread Auger Eric
Hi Jean-Philippe, On 19/01/18 17:21, Jean-Philippe Brucker wrote: > On 16/01/18 23:26, Auger Eric wrote: > [...] >>> + switch (mem->subtype) { >>> + case VIRTIO_IOMMU_RESV_MEM_T_MSI: >>> + region = iommu_alloc_resv_region(addr, size, prot, >>> +

Re: [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2018-01-19 Thread Jean-Philippe Brucker
On 16/01/18 23:26, Auger Eric wrote: [...] >> +switch (mem->subtype) { >> +case VIRTIO_IOMMU_RESV_MEM_T_MSI: >> +region = iommu_alloc_resv_region(addr, size, prot, >> + IOMMU_RESV_MSI); > if (!region) > return -ENOMEM; >> +

Re: [RFCv2 PATCH 05/36] iommu/process: Bind and unbind process to and from devices

2018-01-19 Thread okaya
On 2018-01-19 05:27, Jean-Philippe Brucker wrote: Hi Sinan, On 19/01/18 04:52, Sinan Kaya wrote: Hi Jean-Philippe, On 10/6/2017 9:31 AM, Jean-Philippe Brucker wrote: /** + * iommu_process_bind_device - Bind a process address space to a device + * @dev: the device + * @task: the process to

[PATCH v6 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-01-19 Thread Vivek Gautam
While handling the concerned iommu, there should not be a need to power control the drm devices from iommu interface. If these drm devices need to be powered around this time, the respective drivers should take care of this. Replace the pm_runtime_get/put_sync() with pm_runtime_get/put_suppliers()

[PATCH v6 1/6] base: power: runtime: Export pm_runtime_get/put_suppliers

2018-01-19 Thread Vivek Gautam
The device link allows the pm framework to tie the supplier and consumer. So, whenever the consumer is powered-on the supplier is powered-on first. There are however cases in which the consumer wants to power-on the supplier, but not itself. E.g., A Graphics or multimedia driver wants to power-on

[PATCH v6 4/6] iommu/arm-smmu: Add the device_link between masters and smmu

2018-01-19 Thread Vivek Gautam
From: Sricharan R Finally add the device link between the master device and smmu, so that the smmu gets runtime enabled/disabled only when the master needs it. This is done from add_device callback which gets called once when the master is added to the smmu. Signed-off-by: Sricharan R --- driv

[PATCH v6 5/6] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-01-19 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam --- .../devicetree/bindings/iommu/arm,smmu.txt | 43 +++

[PATCH v6 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-01-19 Thread Vivek Gautam
From: Sricharan R The smmu device probe/remove and add/remove master device callbacks gets called when the smmu is not linked to its master, that is without the context of the master device. So calling runtime apis in those places separately. Signed-off-by: Sricharan R [vivek: Cleanup pm runtim

[PATCH v6 2/6] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-01-19 Thread Vivek Gautam
From: Sricharan R The smmu needs to be functional only when the respective master's using it are active. The device_link feature helps to track such functional dependencies, so that the iommu gets powered when the master device enables itself using pm_runtime. So by adapting the smmu driver for r

[PATCH v6 0/6] iommu/arm-smmu: Add runtime pm/sleep support

2018-01-19 Thread Vivek Gautam
This series provides the support for turning on the arm-smmu's clocks/power domains using runtime pm. This is done using the recently introduced device links patches, which lets the smmu's runtime to follow the master's runtime pm, so the smmu remains powered only when the masters use it. It also

Re: [RFCv2 PATCH 05/36] iommu/process: Bind and unbind process to and from devices

2018-01-19 Thread Jean-Philippe Brucker
Hi Sinan, On 19/01/18 04:52, Sinan Kaya wrote: > Hi Jean-Philippe, > > On 10/6/2017 9:31 AM, Jean-Philippe Brucker wrote: >> /** >> + * iommu_process_bind_device - Bind a process address space to a device >> + * @dev: the device >> + * @task: the process to bind >> + * @pasid: valid address wher