struct sg_table objects and adjust references to the
nents and orig_nents respectively.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187
---
drivers/gpu/drm/tegra/gem.c
struct sg_table objects and adjust references to the
nents and orig_nents respectively.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187
---
drivers/misc/fastrpc.c | 4 +
struct sg_table objects and adjust references to the
nents and orig_nents respectively.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187
---
drivers/gpu/drm/radeon/radeon
struct sg_table objects and adjust references to the
nents and orig_nents respectively.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187
---
drivers/gpu/drm/armada/armada
struct sg_table objects and adjust references to the
nents and orig_nents respectively.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187
---
drivers/rapidio/d
struct sg_table objects and adjust references to the
nents and orig_nents respectively.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187
---
drivers/xen/gntdev-dmabuf
ctions. I hope that I
didn't break anything there.
Patches are based on top of Linux next-20200504.
Best regards,
Marek Szyprowski
References:
[1] https://lkml.org/lkml/2020/3/27/555
[2] https://lkml.org/lkml/2020/3/29/65
[3] Documentation/DMA-API-HOWTO.txt
Changelog:
v3:
- introduce dma_*
Hi Christoph,
On 04.05.2020 14:52, Christoph Hellwig wrote:
> On Mon, May 04, 2020 at 02:50:17PM +0200, Marek Szyprowski wrote:
>> v2:
>> - dropped most of the changes to drm/i915
>> - added fixes for rcar-du, xen, media and ion
>> - fixed a few issues pointed by kbuild
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
Reviewed-by: Christian König
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thr
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
(mis)used to properly
free the (over)allocated scatterlist.
This patch only fixes the sg_table->nents entries in the sg_table objects
exported by the dmabuf related functions, so the other drivers, which
might share buffers with i915 could rely on the nents and orig_nents
values.
Signed-off-by: Mare
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/drm_cache.c| 2 +-
drivers/gpu/drm/drm_gem_shmem_helper.c | 7 ---
drivers/gpu/drm/drm_prim
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
Reviewed-by: Christian König
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thr
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents
vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/
}_sgtable() wrappers, which will use a proper sg_table
entries and call respective DMA-mapping functions. I hope this will help
to avoid issue like this in the future.
Patches are based on top of Linux next-20200504.
Best regards,
Marek Szyprowski
References:
[1] https://lkml.org/lkml/2020/3/27/555
Hi
On 28.04.2020 16:27, Tvrtko Ursulin wrote:
>
> On 28/04/2020 14:19, Marek Szyprowski wrote:
>> The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the
>> numer of the created entries in the DMA address space. However the
>> subsequent calls to dma
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/msm/msm_gem.c | 8
drivers/gpu/drm/msm/msm_iommu.c | 3 ++-
2 files changed, 6 insertions(+), 5 deleti
lists, the next version I will try to
send to the maintainers of the respective drivers.
Best regards,
Marek Szyprowski
References:
[1] https://lkml.org/lkml/2020/3/27/555
[2] https://lkml.org/lkml/2020/3/29/65
[3] Documentation/DMA-API-HOWTO.txt
Patch summary:
Marek Szyprowski (17):
drm: cor
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/tegra/gem.c | 25 +
drivers/gpu/drm/tegra/plane.c | 13 +++--
2 files changed,
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/dma-buf/heaps/heap-helpers.c | 7 ---
drivers/dma-buf/udmabuf.c| 5 +++--
2 files changed, 7 insertions(+)
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/armada/armada_gem.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/virtio/virtgpu_object.c | 11 ++-
drivers/gpu/drm/virtio/virtgpu_vq.c | 8
2 files changed,
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/panfrost/panfrost_gem.c | 3 ++-
drivers/gpu/drm/panfrost/panfrost_mmu.c | 4 +++-
2 files changed, 5 insertions(+)
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/exynos/exynos_drm_g2d.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/radeon/radeon_ttm.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/host1x/job.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/host1x/jo
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/drm_cache.c| 2 +-
drivers/gpu/drm/drm_gem_shmem_helper.c | 7 ---
drivers/gpu/drm/drm_prim
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 7 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8
2 files changed
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/lima/lima_gem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/lima/lima_ge
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/driv
nts in turn holds the result of the dma_map_sg call as stated
in include/linux/scatterlist.h. Adapt the code to obey those rules.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 13 +++--
drivers/gpu/drm/i915/gem/i915_gem_internal.c | 4 ++--
driv
boards (ARM and ARM64).
Tested-by: Marek Szyprowski
Acked-by: Marek Szyprowski (for Exynos and
core changes)
> * Fixed a missing mutex_unlock() reported by Marek Szyprowski,
> thanks for that.
>
> There is also a git-branch available with these patches applied:
>
&
s from the hardware TLBs and empty
> flush
>*queue
>* @iova_to_phys: translate iova to physical address
> - * @add_device: add device to iommu grouping
> - * @remove_device: remove device from iommu grouping
>* @probe_device: Add device to iommu driver handling
>
Fix initialization after driver conversion to
probe_device()/release_device(). Prepared on top of:
https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git/log/?h=iommu-probe-device
Signed-off-by: Marek Szyprowski
---
drivers/iommu/exynos-iommu.c | 80
_by_node(spec->np);
> struct sysmmu_drvdata *data, *entry;
>
> @@ -1302,22 +1317,28 @@ static int exynos_iommu_of_xlate(struct device *dev,
> if (!data)
> return -ENODEV;
>
> - if (!owner) {
> - owner = kzalloc(sizeof(*owner), GFP_KERNEL);
> - if (!owner)
> - return -ENOMEM;
> + data->master = dev;
>
> - INIT_LIST_HEAD(>controllers);
> - mutex_init(>rpm_lock);
> - dev->archdata.iommu = owner;
> + if (!dev->archdata.iommu) {
> + WARN_ON(data->next != NULL);
> +
> + /* SYSMMU list is empty - add drvdata and return */
> + data->next = ERR_PTR(-ENODEV);
> + dev->archdata.iommu = data;
> +
> + return 0;
> }
>
> - list_for_each_entry(entry, >controllers, owner_node)
> + /* Check if SYSMMU is already in the list */
> + for_each_sysmmu(dev, entry)
> if (entry == data)
> return 0;
>
> - list_add_tail(>owner_node, >controllers);
> - data->master = dev;
> + /* Not in the list yet */
> + WARN_ON(data->next != NULL);
> + entry = dev->archdata.iommu;
> + data->next = entry->next;
> + entry->next = data;
>
> return 0;
> }
Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi again,
On 08.04.2020 14:23, Marek Szyprowski wrote:
> Hi Joerg,
>
> On 07.04.2020 20:37, Joerg Roedel wrote:
>> From: Joerg Roedel
>>
>> The 'struct exynos_iommu_owner' is an umbrella for multiple SYSMMU
>> instances attached to one master. As such all these
@@ -1302,15 +1356,11 @@ static int exynos_iommu_of_xlate(struct device *dev,
> if (!data)
> return -ENODEV;
>
> - if (!owner) {
> - owner = kzalloc(sizeof(*owner), GFP_KERNEL);
> - if (!owner)
> - return -ENOMEM;
> + ret =
_iterator *it)
>> {
>>
>> ...
>>
>> if (it->cells_name) {
>>
>> ...
>>
>> } else {
>> count = it->cell_count;/*
obe() function.
Signed-off-by: Marek Szyprowski
---
drivers/iommu/exynos-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index b0c1e5f9daae..a48236c1d5cb 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/io
mu_dma_sync_sg_for_device,
> .map_resource = iommu_dma_map_resource,
> .unmap_resource = iommu_dma_unmap_resource,
> + .get_merge_boundary = iommu_dma_get_merge_boundary,
> };
>
> /*
Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland
s://patchwork.kernel.org/patch/4677941/
https://patchwork.kernel.org/patch/4677401/
It looks that my idea was a bit ahead of its time ;)
Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland
___
iommu mailing list
iommu@li
fer because we *don't* know exactly which parts the device may
> write to". So indeed if we did go down that route we wouldn't need any
> of the sync stuff I was worrying about (but I might suggest naming it
> DMA_ATTR_UPDATE instead). Apologies for being slow :)
Don't we have DMA_BID
allocations.
>
> Signed-off-by: Nicolin Chen
Acked-by: Marek Szyprowski
> ---
> kernel/dma/contiguous.c | 22 +++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
> index b2a87905846d..0
irst CRTC device that has been
registered. Then that device is used for DMA-mapping calls. It is not
very elegant, but works fine and allows to use standard DMA-mapping calls.
Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland
___
iommu mail
omatically installed by its counterpart.
>
> Reported-by: Tobias Jakobi
> Reported-by: Marek Szyprowski
> Fixes: 1874619a7df4 "ARM: dma-mapping: Set proper DMA ops in
> arm_iommu_detach_device()"
> Tested-by: Tobias Jakobi
> Signed-off-by: Robin Murphy
> ---
>
> S
ma_map_resource
> implementation to not provide a somewhat dangerous default and improve
> the error handling.
>
> Changes since v1:
> - don't apply bus offsets in dma_direct_map_resource
Works fine on older Exynos based boards with IOMMU and CMA disabled.
Tested-by: Marek Szypr
Hi Christoph,
On 2019-01-17 18:21, Christoph Hellwig wrote:
> On Mon, Jan 14, 2019 at 01:42:26PM +0100, Marek Szyprowski wrote:
>> On 2019-01-11 19:17, Christoph Hellwig wrote:
>>> vb2_dc_get_userptr pokes into arm direct mapping details to get the
>>> r
Hi Robin,
On 2019-01-14 17:38, Robin Murphy wrote:
> On 14/01/2019 16:09, Thierry Reding wrote:
>> On Mon, Jan 14, 2019 at 02:22:40PM +0100, Marek Szyprowski wrote:
>>> This reverts commit 1874619a7df4b14b23b14877e705ae15325773e3.
>>>
>>> That patch broke IO
() and stays with non-IOMMU dma_ops.
Reported-by: Tobias Jakobi
Fixes: 1874619a7df4 "ARM: dma-mapping: Set proper DMA ops in
arm_iommu_detach_device()"
Signed-off-by: Marek Szyprowski
---
arch/arm/mm/dma-mapping.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --
ut the DMA mapping internals. Feel
free to add my:
Reviewed-by: Marek Szyprowski
Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi Joerg,
On 2018-12-19 15:34, Joerg Roedel wrote:
> Hi Marek,
>
> thanks for the report!
>
> On Wed, Dec 19, 2018 at 10:54:18AM +0100, Marek Szyprowski wrote:
>> On 2018-12-11 16:05, Joerg Roedel wrote:
>>> From: Joerg Roedel
>>>
>>> Make
ps
from local variable.
>
> /* Ignore all other errors apart from EPROBE_DEFER */
> if (err == -EPROBE_DEFER) {
Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi Christoph,
On 2018-12-14 15:24, Christoph Hellwig wrote:
> On Fri, Dec 14, 2018 at 03:11:37PM +0100, Marek Szyprowski wrote:
>> Hi Christoph,
>>
>> On 2018-12-07 20:07, Christoph Hellwig wrote:
>>> Avoid expensive indirect calls in the fast path DMA mapping
>
ps = get_dma_ops(dev);
> void *cpu_addr;
>
> - BUG_ON(!ops);
> WARN_ON_ONCE(dev && !dev->coherent_dma_mask);
>
> if (dma_alloc_from_dev_coherent(dev, size, dma_handle, _addr))
> @@ -352,10 +354,14 @@ void *dma_alloc_attrs(struct device *dev, size_
uot;dma-mapping: support highmem in the generic remap
allocator")
Signed-off-by: Marek Szyprowski
---
kernel/dma/remap.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kernel/dma/remap.c b/kernel/dma/remap.c
index 68a64e3ff6a1..8a44317cfc1a 100644
--- a/kernel/dma/
*dev, size_t
>> size, void *vaddr,
>> dma_addr_t dma_handle, unsigned long attrs)
>> {
>> if (!dma_free_from_pool(vaddr, PAGE_ALIGN(size))) {
>> - void *kaddr = phys_to_virt(dma_to_phys(dev, dma_handle));
>> + phys_addr_t phys = dma_to_phys
truct device *dev, struct
>> device_node *np, bool force_dma)
>> dev_dbg(dev, "device is%sbehind an iommu\n",
>> iommu ? " " : " not ");
>>
>> + /*
>> +* There is at least one case where the driver wan
Hi Robin,
On 2018-09-28 17:31, Robin Murphy wrote:
> On 28/09/18 15:21, Marek Szyprowski wrote:
>> On 2018-09-28 15:52, Robin Murphy wrote:
>>> On 28/09/18 14:26, Marek Szyprowski wrote:
>>>> On 2018-09-12 17:24, Robin Murphy wrote:
>>>>> Most parts o
Instead of allocating a fake IOMMU domain for all Exynos DRM components,
simply reuse the default IOMMU domain of the already selected DMA device.
This allows some design changes in IOMMU framework without breaking IOMMU
support in Exynos DRM.
Signed-off-by: Marek Szyprowski
---
Inki
Hi Robin,
On 2018-09-28 15:52, Robin Murphy wrote:
> On 28/09/18 14:26, Marek Szyprowski wrote:
>> On 2018-09-12 17:24, Robin Murphy wrote:
>>> Most parts of iommu-dma already assume they are operating on a default
>>> domain set up by iommu_dma_init_domain(), an
(dev), handle, size);
> }
>
> int iommu_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
> @@ -850,7 +851,7 @@ static struct iommu_dma_msi_page
> *iommu_dma_get_msi_page(struct device *dev,
> if (!msi_page)
> return NULL;
>
> -
t; [0.00] secondary_startup_64+0xa4/0xb0
>
> This patch adds a check to prevent the panic.
>
> Signed-off-by: He Zhe
> Cc: sta...@vger.kernel.org
> Cc: h...@lst.de
> Cc: m.szyprow...@samsung.com
> Cc: robin.mur...@arm.com
Thanks for the fix.
Reviewed-by: Marek Szypr
Hi Rafael,
On 2018-07-11 22:36, Rafael J. Wysocki wrote:
> On Wed, Jul 11, 2018 at 3:40 PM, Marek Szyprowski
> wrote:
>> Hi Tomasz,
>>
>> On 2018-07-11 14:51, Tomasz Figa wrote:
>>> On Wed, Jul 11, 2018 at 8:11 PM Rafael J. Wysocki wrote:
>>>> O
e)
>>>> This is suspicious.
>>>>
>>>> If you need a runtime suspend method, why do you think that it is not
>>>> necessary
>>>> to suspend the device during system-wide transitions?
>>> Okay, so you suggest to put clock disabling i
to avoid giving false feeling that this function supports
standard gfp flags and callers can pass __GFP_ZERO to get zeroed buffer,
what has already been an issue: see commit dd65a941f6ba ("arm64:
dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag").
Signed-off-by: Marek
already been an issue: see commit dd65a941f6ba ("arm64:
dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag").
Signed-off-by: Marek Szyprowski
---
arch/powerpc/kvm/book3s_hv_builtin.c | 2 +-
drivers/s390/char/vmcp.c | 2 +-
drivers/staging/a
/
Best regards
Marek Szyprowski
Samsung R Institute Poland
Patch summary:
Marek Szyprowski (2):
mm/cma: remove unsupported gfp_mask parameter from cma_alloc()
dma: remove unsupported gfp_mask parameter from
dma_alloc_from_contiguous()
arch/arm/mm/dma-mapping.c | 5
> Cc: Frank Rowand <frowand.l...@gmail.com>
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: iommu@lists.linux-foundation.org
> Cc: linux-samsung-...@vger.kernel.org
> Cc: linux-arm-...@vger.kernel.org
> Cc: linux-rockc...@lists.infradead.org
> Cc: devicet...@vger.kern
stoph Hellwig <h...@lst.de>
Nice! Unification of this is definitely needed and solves the issues
reported some time ago:
https://patchwork.kernel.org/patch/9429637/ (arm)
https://patchwork.kernel.org/patch/9431161/ (arm64, rejected)
Acked-by: Marek Szyprowski <m.szyprow...@samsung.com&g
ion; let's just use that one instead.
Signed-off-by: Robin Murphy <robin.mur...@arm.com>
Thanks for this cleanup!
Tested-by: Marek Szyprowski <m.szyprow...@samsung.com>
---
drivers/iommu/exynos-iommu.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff
Hi Jeffy,
On 2018-01-11 12:14, JeffyChen wrote:
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
+-
drivers/iommu/arm-smmu.c | 12 ++--
drivers/iommu/exynos-iommu.c | 2 +-
For Exynos IOMMU:
Acked-by: Marek Szyprowski <m.szyprow...@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 928055a01
custom platform device registration
code")
Signed-off-by: Robin Murphy <robin.mur...@arm.com>
Acked-by: Marek Szyprowski <m.szyprow...@samsung.com>
---
v2: Use the simpler explicit DT check.
drivers/iommu/exynos-iommu.c | 7 +++
1 file changed, 7 insertions(+)
diff --git
__func__);
- goto err_set_iommu;
- }
-
return 0;
-err_set_iommu:
- kmem_cache_free(lv2table_kmem_cache, zero_lv2_table);
+
err_zero_lv2:
platform_driver_unregister(_sysmmu_driver);
err_reg_driver:
Best regards
--
Marek Szy
Hi Peng,
On 2017-11-27 10:04, Peng Fan wrote:
On Mon, Nov 27, 2017 at 09:44:20AM +0100, Marek Szyprowski wrote:
On 2017-11-27 09:37, Peng Fan wrote:
On Mon, Nov 27, 2017 at 09:31:00AM +0100, Marek Szyprowski wrote:
On 2017-11-26 14:13, Peng Fan wrote:
Invoke of_reserved_mem_device_init
Hi Peng,
On 2017-11-27 09:37, Peng Fan wrote:
Hi Marek,
On Mon, Nov 27, 2017 at 09:31:00AM +0100, Marek Szyprowski wrote:
Hi
On 2017-11-26 14:13, Peng Fan wrote:
Invoke of_reserved_mem_device_init at dma_configure, then
there is no need to call of_reserved_mem_device_init in device
specific
_DMA_NOT_SUPPORTED)
@@ -367,5 +370,6 @@ int dma_configure(struct device *dev)
void dma_deconfigure(struct device *dev)
{
of_dma_deconfigure(dev);
+ of_reserved_mem_device_release(dev);
acpi_dma_deconfigure(dev);
}
Best regards
--
Marek Szyprowski, PhD
Samsung
ro_area(mem->bitmap, mem->size, 0,
+ nr_page, 0);
+ if (unlikely(pageno >= mem->size)) {
goto err;
+ bitmap_set(mem->bitmap, pageno, nr_page);
/*
* Memory was found in the coherent area.
Best regards
--
Hi Robin,
On 2017-10-13 12:48, Robin Murphy wrote:
On 13/10/17 09:15, Marek Szyprowski wrote:
On 2017-10-11 15:56, Robin Murphy wrote:
xHCI requires that data buffers do not cross 64KB boundaries (and are
thus at most 64KB long as well) - whilst xhci_queue_{bulk,isoc}_tx()
already split
ma_parms are
provided, so there is very little value added by this patch.
Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi Joerg,
On 2017-10-10 14:13, Joerg Roedel wrote:
On Mon, Oct 09, 2017 at 01:40:23PM +0200, Marek Szyprowski wrote:
Exynos SYSMMU registers standard platform device with sysmmu_of_match
table, what means that this table is accessed every time a new platform
device is registered in a system
caused by access to freed memory.
Fixes: 6b21a5db3642 ("iommu/exynos: Support for device tree")
Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
---
Hi!
This issue was there from the beggining of the device tree
support, I'm really surprised that it has not been not
301 - 400 of 824 matches
Mail list logo