Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1280796 > unrolled thread
| Started by | Yong Wu <yong.wu@mediatek.com> |
|---|---|
| First post | 2015-12-01 12:40 +0100 |
| Last post | 2015-12-01 16:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 0/8] iommu: Make core iommu-groups code more generic Yong Wu <yong.wu@mediatek.com> - 2015-12-01 12:40 +0100
Re: [PATCH 0/8] iommu: Make core iommu-groups code more generic Joerg Roedel <joro@8bytes.org> - 2015-12-01 16:20 +0100
| From | Yong Wu <yong.wu@mediatek.com> |
|---|---|
| Date | 2015-12-01 12:40 +0100 |
| Subject | Re: [PATCH 0/8] iommu: Make core iommu-groups code more generic |
| Message-ID | <qARrQ-Ak-5@gated-at.bofh.it> |
On Thu, 2015-11-19 at 14:41 +0100, Joerg Roedel wrote:
> Hi Yong Wu,
>
> On Thu, Nov 19, 2015 at 04:13:21PM +0800, Yong Wu wrote:
> > (151119_13:39:37.472)WARNING:
> > at /proj/mtk40525/upstreamdev/v4.4/kernel/mediatek/drivers/iommu/iommu.c:1154
> > (151119_13:39:37.472)Modules linked in:
> > (151119_13:39:37.472)CPU: 1 PID: 731 Comm: sh Not tainted 4.4.0-rc1+
> > #37
> > (151119_13:39:37.472)Hardware name: MediaTek MT8173 evaluation board
> > (DT)
> > (151119_13:39:37.472)task: ffffffc076bb4d00 ti: ffffffc076bdc000
> > task.ti: ffffffc076bdc000
> > (151119_13:39:37.472)PC is at iommu_detach_device+0x5c/0xb0
> > (151119_13:39:37.472)LR is at iommu_detach_device+0x30/0xb0
> > xxx
>
> This warning triggers when you use iommu_detach_device() with a device
> that is in a group with other devices. For those devices you must
> attach/detach the whole group of devices.
>
> For that you have to use iommu_detach_group() and iommu_attach_group().
>
>
> Joerg
>
Currently We have to use iommu_detach_group and iommu_attach_group.
Is there any plan for adding detach/attach the device within a iommu
group?
Why I ask this is because that:
There are 2 interfaces in MTK-SMI patch, named by
mtk_smi_larb_get/mtk_smi_larb_put which help enable/disable the
power-domain and clocks for each a device(local arbiter).
Take a example, VIDEO have to call mtk_smi_larb_get to enable its power
and clocks before it works and call mtk_smi_larb_put to disable them
after it work done.
If the iommu support attach/detach the device in a iommu-group, then
we could request VIDEO to call iommu_attach_device before it works(the
mtk_iommu_attach_device will call the smi interface to enable its power,
clocks and enable iommu).and call iommu_detach_device after it work
done. then the VIDEO could call iommu_attach_device/iommu_detach_device
instead of talking with SMI directly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Joerg Roedel <joro@8bytes.org> |
|---|---|
| Date | 2015-12-01 16:20 +0100 |
| Message-ID | <qAUSK-2T0-19@gated-at.bofh.it> |
| In reply to | #1280796 |
Hi Yong Wu, On Tue, Dec 01, 2015 at 07:29:51PM +0800, Yong Wu wrote: > Currently We have to use iommu_detach_group and iommu_attach_group. > Is there any plan for adding detach/attach the device within a iommu > group? No, there is no such plan. The reason is using attach/detach_device always also affects the other devices in the iommu-group. Therefore attach/detach_device was limited to devices which have no others in their group. Having attach/detach_group makes it more obvious to the user that the call affects more than one device. Joerg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web