All of lore.kernel.org
 help / color / mirror / Atom feed
From: JeffyChen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: Marek Szyprowski
	<m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Frank Rowand
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	Krzysztof Kozlowski
	<krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Kukjin Kim <kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/9] iommu/of: Drop early initialisation hooks
Date: Thu, 11 Jan 2018 19:14:38 +0800	[thread overview]
Message-ID: <5A57471E.7020304@rock-chips.com> (raw)
In-Reply-To: <60fdd375-ca74-0fea-c598-39a68b9e7735-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Hi Marek,

Thanks for your reply.

On 01/11/2018 05:40 PM, Marek Szyprowski wrote:
> Hi Jeffy,
>
> On 2018-01-11 09:22, Jeffy Chen wrote:
>> With the probe-deferral mechanism, early initialisation hooks are no
>> longer needed.
>>
>> Suggested-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>> ---
>>
>>   drivers/iommu/arm-smmu-v3.c  |  2 +-
>>   drivers/iommu/arm-smmu.c     | 12 ++++++------
>>   drivers/iommu/exynos-iommu.c |  2 +-
>
> For Exynos IOMMU:
> Acked-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>
> IPMMU and MSM IOMMU are no longer multi-platform safe after this patch.
> It breaks them in the same way as my commit 928055a01b3f ("iommu/exynos:
> Remove custom platform device registration code") broke Exynos IOMMU.
>
> You need a similar fix for them:
> https://www.spinics.net/lists/arm-kernel/msg627648.html

hmmm, right, i did saw this fix in the rockchip iommu driver too.

and there're also some other iommu drivers put bus_set_iommu in their 
probe() to avoid that.

maybe we can do it in the iommu framework?

for example:
1/ add a bus type member to struct iommu_device
2/ and a iommu_device_set_bus()
3/ do the bus_set_iommu stuff in iommu_device_register()
4/ undo bus_set_iommu in iommu_device_unregister()

WARNING: multiple messages have this Message-ID (diff)
From: jeffy.chen@rock-chips.com (JeffyChen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/9] iommu/of: Drop early initialisation hooks
Date: Thu, 11 Jan 2018 19:14:38 +0800	[thread overview]
Message-ID: <5A57471E.7020304@rock-chips.com> (raw)
In-Reply-To: <60fdd375-ca74-0fea-c598-39a68b9e7735@samsung.com>

Hi Marek,

Thanks for your reply.

On 01/11/2018 05:40 PM, Marek Szyprowski wrote:
> Hi Jeffy,
>
> On 2018-01-11 09:22, Jeffy Chen wrote:
>> With the probe-deferral mechanism, early initialisation hooks are no
>> longer needed.
>>
>> Suggested-by: Robin Murphy <robin.murphy@arm.com>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> ---
>>
>>   drivers/iommu/arm-smmu-v3.c  |  2 +-
>>   drivers/iommu/arm-smmu.c     | 12 ++++++------
>>   drivers/iommu/exynos-iommu.c |  2 +-
>
> For Exynos IOMMU:
> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
>
> IPMMU and MSM IOMMU are no longer multi-platform safe after this patch.
> It breaks them in the same way as my commit 928055a01b3f ("iommu/exynos:
> Remove custom platform device registration code") broke Exynos IOMMU.
>
> You need a similar fix for them:
> https://www.spinics.net/lists/arm-kernel/msg627648.html

hmmm, right, i did saw this fix in the rockchip iommu driver too.

and there're also some other iommu drivers put bus_set_iommu in their 
probe() to avoid that.

maybe we can do it in the iommu framework?

for example:
1/ add a bus type member to struct iommu_device
2/ and a iommu_device_set_bus()
3/ do the bus_set_iommu stuff in iommu_device_register()
4/ undo bus_set_iommu in iommu_device_unregister()

WARNING: multiple messages have this Message-ID (diff)
From: JeffyChen <jeffy.chen@rock-chips.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-kernel@vger.kernel.org
Cc: jcliang@chromium.org, robin.murphy@arm.com, tfiga@chromium.org,
	linux-samsung-soc@vger.kernel.org, Kukjin Kim <kgene@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	iommu@lists.linux-foundation.org,
	Frank Rowand <frowand.list@gmail.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Rob Clark <robdclark@gmail.com>,
	Will Deacon <will.deacon@arm.com>, Joerg Roedel <joro@8bytes.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/9] iommu/of: Drop early initialisation hooks
Date: Thu, 11 Jan 2018 19:14:38 +0800	[thread overview]
Message-ID: <5A57471E.7020304@rock-chips.com> (raw)
In-Reply-To: <60fdd375-ca74-0fea-c598-39a68b9e7735@samsung.com>

Hi Marek,

Thanks for your reply.

On 01/11/2018 05:40 PM, Marek Szyprowski wrote:
> Hi Jeffy,
>
> On 2018-01-11 09:22, Jeffy Chen wrote:
>> With the probe-deferral mechanism, early initialisation hooks are no
>> longer needed.
>>
>> Suggested-by: Robin Murphy <robin.murphy@arm.com>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> ---
>>
>>   drivers/iommu/arm-smmu-v3.c  |  2 +-
>>   drivers/iommu/arm-smmu.c     | 12 ++++++------
>>   drivers/iommu/exynos-iommu.c |  2 +-
>
> For Exynos IOMMU:
> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
>
> IPMMU and MSM IOMMU are no longer multi-platform safe after this patch.
> It breaks them in the same way as my commit 928055a01b3f ("iommu/exynos:
> Remove custom platform device registration code") broke Exynos IOMMU.
>
> You need a similar fix for them:
> https://www.spinics.net/lists/arm-kernel/msg627648.html

hmmm, right, i did saw this fix in the rockchip iommu driver too.

and there're also some other iommu drivers put bus_set_iommu in their 
probe() to avoid that.

maybe we can do it in the iommu framework?

for example:
1/ add a bus type member to struct iommu_device
2/ and a iommu_device_set_bus()
3/ do the bus_set_iommu stuff in iommu_device_register()
4/ undo bus_set_iommu in iommu_device_unregister()

  parent reply	other threads:[~2018-01-11 11:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11  8:22 [PATCH 0/9] iommu/rockchip: Use OF_IOMMU Jeffy Chen
2018-01-11  8:22 ` Jeffy Chen
2018-01-11  8:22 ` [PATCH 1/9] iommu/of: Drop early initialisation hooks Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen
     [not found]   ` <20180111082229.24011-2-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-11  9:40     ` Marek Szyprowski
2018-01-11  9:40       ` Marek Szyprowski
2018-01-11  9:40       ` Marek Szyprowski
     [not found]       ` <60fdd375-ca74-0fea-c598-39a68b9e7735-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2018-01-11 11:14         ` JeffyChen [this message]
2018-01-11 11:14           ` JeffyChen
2018-01-11 11:14           ` JeffyChen
     [not found]           ` <5A57471E.7020304-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-11 12:24             ` Robin Murphy
2018-01-11 12:24               ` Robin Murphy
2018-01-11 12:24               ` Robin Murphy
     [not found]               ` <faeccc75-79e9-ddb6-446d-88ab63fe4e1f-5wv7dgnIgG8@public.gmane.org>
2018-01-12  1:22                 ` JeffyChen
2018-01-12  1:22                   ` JeffyChen
2018-01-12  1:22                   ` JeffyChen
2018-01-11 12:26           ` Marek Szyprowski
2018-01-11 12:26             ` Marek Szyprowski
2018-01-11  8:22 ` [PATCH 2/9] iommu/rockchip: Fix error handling in attach Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen
     [not found]   ` <20180111082229.24011-3-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-11 15:47     ` Robin Murphy
2018-01-11 15:47       ` Robin Murphy
2018-01-11 15:47       ` Robin Murphy
2018-01-12  0:33       ` JeffyChen
2018-01-12  0:33         ` JeffyChen
2018-01-11  8:22 ` [PATCH 3/9] iommu/rockchip: Fix error handling in probe Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen
2018-01-11  8:22 ` [PATCH 4/9] iommu/rockchip: Fix error handling in init Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen
2018-01-11  8:22 ` [PATCH 5/9] iommu/rockchip: Use iopoll helpers to wait for hardware Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen
2018-01-11  8:22 ` [PATCH 6/9] iommu/rockchip: Fix TLB flush of secondary IOMMUs Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen
     [not found] ` <20180111082229.24011-1-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-11  8:22   ` [PATCH 7/9] iommu/rockchip: Use iommu_group_get_for_dev() for add_device Jeffy Chen
2018-01-11  8:22     ` Jeffy Chen
2018-01-11  8:22     ` Jeffy Chen
2018-01-11  8:22 ` [PATCH 8/9] iommu/rockchip: Use IOMMU device for dma mapping operations Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen
2018-01-11  8:22 ` [PATCH 9/9] iommu/rockchip: Use OF_IOMMU to attach devices automatically Jeffy Chen
2018-01-11  8:22   ` Jeffy Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A57471E.7020304@rock-chips.com \
    --to=jeffy.chen-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.