Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1508013
| From | "Sricharan" <sricharan@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm |
| Date | 2016-10-25 09:00 +0200 |
| Message-ID | <sw3Si-239-25@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <sufXA-4qj-35@gated-at.bofh.it> <svnJn-7HI-1@gated-at.bofh.it> <svG9j-3gb-11@gated-at.bofh.it> <svMy6-7xJ-31@gated-at.bofh.it> <svMHM-7B9-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Marek,
>>>>> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
>>>>> index 5e6d7bbf9b70..59b4f2ce4f5f 100644
>>>>> --- a/drivers/iommu/exynos-iommu.c
>>>>> +++ b/drivers/iommu/exynos-iommu.c
>>>>> @@ -781,10 +781,6 @@ static void exynos_iommu_detach_device(struct iommu_domain *iommu_domain,
>>>>> if (!has_sysmmu(dev) || owner->domain != iommu_domain)
>>>>> return;
>>>>>
>>>>> - list_for_each_entry(data, &owner->controllers, owner_node) {
>>>>> - pm_runtime_put_sync(data->sysmmu);
>>>>> - }
>>>>> -
>>>>> mutex_lock(&owner->rpm_lock);
>>>>>
>>>>> list_for_each_entry(data, &owner->controllers, owner_node) {
>>>>> @@ -848,10 +844,6 @@ static int exynos_iommu_attach_device(struct iommu_domain *iommu_domain,
>>>>>
>>>>> mutex_unlock(&owner->rpm_lock);
>>>>>
>>>>> - list_for_each_entry(data, &owner->controllers, owner_node) {
>>>>> - pm_runtime_get_sync(data->sysmmu);
>>>>> - }
>>>>> -
>>>>> dev_dbg(dev, "%s: Attached IOMMU with pgtable %pa\n", __func__,
>>>>> &pagetable);
>>>>>
>>>>> @@ -1232,6 +1224,14 @@ static int exynos_iommu_of_xlate(struct device *dev,
>>>>>
>>>>> list_add_tail(&data->owner_node, &owner->controllers);
>>>>> data->master = dev;
>>>>> +
>>>>> + /*
>>>>> + * SYSMMU will be runtime activated via device link (dependency) to its
>>>>> + * master device, so there are no direct calls to pm_runtime_get/put
>>>>> + * in this driver.
>>>>> + */
>>>>> + device_link_add(dev, data->sysmmu, DL_FLAG_PM_RUNTIME);
>>>>> +
>>>> So in the case of master with multiple sids, this would be called multiple times
>>>> for the same master ?
>>> I don't know what is "multiple sids" case, but if given SYSMMU master
>>> device (supplier)
>>> has multiple SYSMMU controllers (consumers), then links will be created
>>> for each SYSMMU
>>> controller. Please note that this code is based on vanilla v4.9-rc1,
>>> which calls
>>> of_xlate() callback only once for every iommu for given master device.
>>> Your IOMMU
>>> deferred probe patches change this, but I already posted a fix for
>>> Exynos IOMMU driver
>>> to handle such case.
>> By multiple sids, i meant iommus = <&phandle sid1 sid2 .. sidn> case,
>> so xlate would be called multiples for the same master without deferred
>> probing also. But the fix that you showed on the other thread would work
>> here as well or maybe if you dont have masters with multiple sids you wont
>> have any issues as well.
>
>Exynos SYSMMU driver always use "#iommu-cells = <0>", so it doesn't support
>multiple sids. However there is a case with 2 SYSMMU controllers attached
>to the same master device: "iommus = <&sysmmu_mfc_l>, <&sysmmu_mfc_r>;".
>
with iommu-cells = <0> always, its ok. The case of 2 SYSMMU controllers that
is shown above is fine, as anyways both the suppliers (symmu) needs to linked
seperately. So it looks all fine.
Regards,
Sricharan
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v5 0/7] Exynos IOMMU: proper runtime PM support (use device dependencies) Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-20 09:30 +0200
[PATCH v5 1/7] iommu/exynos: Remove excessive, useless debug Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-20 09:30 +0200
[PATCH v5 6/7] iommu/exynos: Add runtime pm support Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-20 09:30 +0200
RE: [PATCH v5 6/7] iommu/exynos: Add runtime pm support "Sricharan" <sricharan@codeaurora.org> - 2016-10-22 08:00 +0200
Re: [PATCH v5 6/7] iommu/exynos: Add runtime pm support Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-24 07:30 +0200
RE: [PATCH v5 6/7] iommu/exynos: Add runtime pm support "Sricharan" <sricharan@codeaurora.org> - 2016-10-24 14:20 +0200
[PATCH v5 3/7] iommu/exynos: Simplify internal enable/disable functions Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-20 09:30 +0200
[PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-20 09:30 +0200
RE: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm "Sricharan" <sricharan@codeaurora.org> - 2016-10-23 12:00 +0200
Re: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-24 07:40 +0200
RE: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm "Sricharan" <sricharan@codeaurora.org> - 2016-10-24 14:30 +0200
Re: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-24 14:40 +0200
RE: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm "Sricharan" <sricharan@codeaurora.org> - 2016-10-25 09:00 +0200
[PATCH v5 2/7] iommu/exynos: Remove dead code Marek Szyprowski <m.szyprowski@samsung.com> - 2016-10-20 09:30 +0200
csiph-web