lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] iommu/mediatek-v1: Add def_domain_type
On Fri, May 15, 2020 at 04:08:43PM +0800, Yong Wu wrote:
> The MediaTek V1 IOMMU is arm32 whose default domain type is
> IOMMU_DOMAIN_UNMANAGED. Add this to satisfy the bus_iommu_probe to
> enter "probe_finalize".
>
> The iommu framework will create a iommu domain for each a device.
> But all the devices share a iommu domain here, thus we skip all the
> other domains in the "attach_device" except the domain we create
> internally with arm_iommu_create_mapping.
>
> Also a minor change: in the attach_device, "data" always is not null.
> Remove "if (!data) return".
>
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> ---
> a. rebase on linux-next.
> b. After this patch and fixed the mutex issue(locally I only move
> mutex_unlock(&group->mutex) before __iommu_group_dma_attach(group)),
> the mtk_iommu_v1.c could work normally.
> ---
> drivers/iommu/mtk_iommu_v1.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)

Applied, thanks.

\
 
 \ /
  Last update: 2020-05-18 15:43    [W:0.322 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site