Hi Tomasz,
On 01/17/2018 03:38 PM, Tomasz Figa wrote:
>>Don't we need to check here (and in _shutdown() too) if we have a
>>domain attached?
>
>hmmm, right, the startup might been called by resume, so should check
>iommu->domain here.
>
>but the shutdown would be called at the end of detach or
On 01/17/2018 03:30 PM, Tomasz Figa wrote:
>but it's possible the probe failed after calling iommu_device_set_fwnode, so
>i'll try to add some checks here, and maybe adjust probe() to prevent it
>too.
I think iommu_device_set_fwnode() is not enough for of_iommu_xlate()
to find the IOMMU. The
Hi Tomasz,
On 01/17/2018 03:16 PM, Tomasz Figa wrote:
>>
>>This lacks consistency. of_irq_count() is used for counting, but
>>platform_get_irq() is used for getting. Either platform_ or of_ API
>>should be used for both and I'd lean for platform_, since it's more
>>general.
>
>hmmm, right, i
Hi Tomasz,
Thanks for your reply.
On 01/17/2018 02:20 PM, Tomasz Figa wrote:
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
When the power domain is powered off, the IOMMU cannot be accessed and
register programming must be deferred until the power domain
Hi Tomasz,
Thanks for your reply.
On 01/17/2018 01:44 PM, Tomasz Figa wrote:
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
Converts the rockchip-iommu driver to use the OF_IOMMU infrastructure,
which allows attaching master devices to their IOMMUs
Hi Tomasz,
On 01/17/2018 01:32 PM, Tomasz Figa wrote:
On Wed, Jan 17, 2018 at 1:23 PM, Tomasz Figa wrote:
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
It's not safe to unbind rockchip IOMMU driver.
Might be good to explain why it is
Hi Tomasz,
On 01/17/2018 01:26 PM, Tomasz Figa wrote:
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
It's hard to undo bus_set_iommu() in the error path, so move it to the
end of rk_iommu_probe().
Does this work fine now? I remember we used to need this
Hi Tomasz,
Thanks for your reply.
On 01/17/2018 12:21 PM, Tomasz Figa wrote:
Hi Jeffy,
Thanks for the patch. Please see my comments inline.
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
Please add patch description.
ok, will do.
Suggested-by: Robin
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
> When the power domain is powered off, the IOMMU cannot be accessed and
> register programming must be deferred until the power domain becomes
> enabled.
>
> Add runtime PM support, and use runtime PM device link from
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
> Converts the rockchip-iommu driver to use the OF_IOMMU infrastructure,
> which allows attaching master devices to their IOMMUs automatically
> according to DT properties.
>
> Signed-off-by: Jeffy Chen
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
> Use the first registered IOMMU device for dma mapping operations, and
> drop the domain platform device.
>
> This is similar to exynos iommu driver.
>
> Signed-off-by: Jeffy Chen
> ---
>
>
On Wed, Jan 17, 2018 at 1:23 PM, Tomasz Figa wrote:
> On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen
> wrote:
>> It's not safe to unbind rockchip IOMMU driver.
>
> Might be good to explain why it is not safe and actually add that it
> does not make
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
> It's hard to undo bus_set_iommu() in the error path, so move it to the
> end of rk_iommu_probe().
Does this work fine now? I remember we used to need this called in an
early initcall for all the ARM/ARM64 DMA stuff
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
> Add missing iommu_device_sysfs_remove in error path.
>
> Also adjust sequence of deinit functions in the remove.
>
> Signed-off-by: Jeffy Chen
> ---
>
> Changes in v2: None
>
>
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
> It's not safe to unbind rockchip IOMMU driver.
Might be good to explain why it is not safe and actually add that it
does not make any sense for such low level devices.
Best regards,
Tomasz
Hi Jeffy,
Thanks for the patch. Please see my comments inline.
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote:
Please add patch description.
> Suggested-by: Robin Murphy
> Signed-off-by: Jeffy Chen
> ---
[snip]
Hi Jean-Philippe,
On 17/11/17 19:52, Jean-Philippe Brucker wrote:
> When the device offers the probe feature, send a probe request for each
> device managed by the IOMMU. Extract RESV_MEM information. When we
> encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region.
> This will
On 16/01/18 10:10, Auger Eric wrote:
> Hi,
>
> On 17/11/17 19:52, Jean-Philippe Brucker wrote:
>> The event queue offers a way for the device to report access faults from
>> devices.
> end points?
Yes
[...]
>> +static void viommu_event_handler(struct virtqueue *vq)
>> +{
>> +int ret;
>> +
On 16/01/18 09:25, Auger Eric wrote:
[...]
>> +static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
>> + struct virtio_iommu_probe_resv_mem *mem,
>> + size_t len)
>> +{
>> +struct iommu_resv_region *region = NULL;
>> +unsigned
On 15/01/18 15:12, Auger Eric wrote:
[...]
>> +/*
>> + * viommu_get_req_size - compute request size
>> + *
>> + * A virtio-iommu request is split into one device-read-only part (top) and
>> one
>> + * device-write-only part (bottom). Given a request, return the sizes of
>> the two
>> + * parts
When the power domain is powered off, the IOMMU cannot be accessed and
register programming must be deferred until the power domain becomes
enabled.
Add runtime PM support, and use runtime PM device link from IOMMU to
master to startup and shutdown IOMMU.
Signed-off-by: Jeffy Chen
There would be some masters sharing the same IOMMU device. Put them in
the same iommu group and share the same iommu domain.
Signed-off-by: Jeffy Chen
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 39 +++
1 file
From: Tomasz Figa
Current code relies on master driver enabling necessary clocks before
IOMMU is accessed, however there are cases when the IOMMU should be
accessed while the master is not running yet, for example allocating
V4L2 videobuf2 buffers, which is done by the VB2
Converts the rockchip-iommu driver to use the OF_IOMMU infrastructure,
which allows attaching master devices to their IOMMUs automatically
according to DT properties.
Signed-off-by: Jeffy Chen
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 116
Use the first registered IOMMU device for dma mapping operations, and
drop the domain platform device.
This is similar to exynos iommu driver.
Signed-off-by: Jeffy Chen
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 91
IOMMU drivers are supposed to call this function instead of manually
creating a group in their .add_device callback. This behavior is not
strictly required by ARM DMA mapping implementation, but ARM64 already
relies on it. This patch fixes the rockchip-iommu driver to comply with
this requirement.
It's hard to undo bus_set_iommu() in the error path, so move it to the
end of rk_iommu_probe().
Signed-off-by: Jeffy Chen
---
Changes in v2:
Move bus_set_iommu() to rk_iommu_probe().
drivers/iommu/rockchip-iommu.c | 20 +++-
1 file changed, 7
From: Tomasz Figa
Due to the bug in current code, only first IOMMU has the TLB lines
flushed in rk_iommu_zap_lines. This patch fixes the inner loop to
execute for all IOMMUs and properly flush the TLB.
Signed-off-by: Tomasz Figa
Signed-off-by: Jeffy Chen
Suggested-by: Robin Murphy
Signed-off-by: Jeffy Chen
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 38 +++---
1 file changed, 11 insertions(+), 27 deletions(-)
diff --git
Add missing iommu_device_sysfs_remove in error path.
Also adjust sequence of deinit functions in the remove.
Signed-off-by: Jeffy Chen
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff
It's not safe to unbind rockchip IOMMU driver.
Signed-off-by: Jeffy Chen
---
Changes in v2: None
drivers/iommu/rockchip-iommu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index
From: Tomasz Figa
Currently if the driver encounters an error while attaching device, it
will leave the IOMMU in an inconsistent state. Even though it shouldn't
really happen in reality, let's just add proper error path to keep
things consistent.
Signed-off-by: Tomasz Figa
Hi Jean-Philippe,
On 17/11/17 19:52, Jean-Philippe Brucker wrote:
> When the device offers the probe feature, send a probe request for each
> device managed by the IOMMU. Extract RESV_MEM information. When we
> encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region.
> This will
Am 16.01.2018 um 09:28 schrieb Christoph Hellwig:
On Tue, Jan 16, 2018 at 09:22:52AM +0100, Christian König wrote:
Hi Konrad,
can you send the first patch to Linus for inclusion in 4.15 if you haven't
already done so?
It's in the 4.16 queue with a cc to stable. I guess we're ok with
a
On Tue, Jan 16, 2018 at 09:22:52AM +0100, Christian König wrote:
> Hi Konrad,
>
> can you send the first patch to Linus for inclusion in 4.15 if you haven't
> already done so?
It's in the 4.16 queue with a cc to stable. I guess we're ok with
a duplicate commit if we have to.
Hi Konrad,
can you send the first patch to Linus for inclusion in 4.15 if you
haven't already done so?
I'm still getting reports from people complaining about the error message.
Thanks,
Christian.
Am 16.01.2018 um 08:53 schrieb Christoph Hellwig:
I've pulled this into the dma-mapping
36 matches
Mail list logo