Re: [PATCH 01/13] iommu/exynos: Use dev_iommu_priv_get/set()

2020-06-29 Thread Marek Szyprowski
On 25.06.2020 15:08, Joerg Roedel wrote: > From: Joerg Roedel > > Remove the use of dev->archdata.iommu and use the private per-device > pointer provided by IOMMU core code instead. > > Signed-off-by: Joerg Roedel Acked-by: Marek Szyprowski > --- > d

Re: [PATCH v2 5/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2020-11-25 Thread Marek Szyprowski
;buffer) { > + if (!uvc_alloc_urb_buffer(stream, uvc_urb, gfp_flags)) { > uvc_free_urb_buffers(stream); > break; > } > diff --git a/drivers/media/usb/uvc/uvcvideo.h > b/drivers/media/usb/uvc/uvcvideo.h > index a3dfacf069c4..3e6618a2ac82 100644 > --- a/drivers/media/usb/uvc/uvcvideo.h > +++ b/drivers/media/usb/uvc/uvcvideo.h > @@ -532,6 +532,8 @@ struct uvc_urb { > > char *buffer; > dma_addr_t dma; > + struct page **pages; > + struct sg_table sgt; > > unsigned int async_operations; > struct uvc_copy_op copy_operations[UVC_MAX_PACKETS]; Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] iommu: Clarify .of_xlate assumptions

2020-10-30 Thread Marek Szyprowski
Murphy > --- > drivers/iommu/arm/arm-smmu/qcom_iommu.c | 7 --- > drivers/iommu/exynos-iommu.c | 15 ++- Acked-by: Marek Szyprowski > drivers/iommu/ipmmu-vmsa.c | 13 ++--- > drivers/iommu/mtk_iommu.c | 8 >

Re: [PATCH 1/1] dma: coherent: check no-map property for arm64

2021-06-15 Thread Marek Szyprowski
- one would need to split 2M entry into 4K entries. Second - 2M section mappings for the whole lowmem area are located in the per-process page tables. Changing the cache attributes would require locking all processes and iterating over their page table entries, which is

Re: [PATCH v3 3/9] iommu/arm-smmu: Implement ->probe_finalize()

2021-06-15 Thread Marek Szyprowski
m-smmu.h > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h > @@ -439,6 +439,7 @@ struct arm_smmu_impl { > struct device *dev, int start); > void (*write_s2cr)(struct arm_smmu_device *smmu, int idx); > void (*write_sctlr)(struct arm_smmu_device

[PATCH] iommu: qcom: Revert "iommu/arm: Cleanup resources in case of probe error path"

2021-07-05 Thread Marek Szyprowski
patch. Revert relevant changes to the QCOM IOMMU driver until a proper fix is prepared. This partially reverts commit 249c9dc6aa0db74a0f7908efd04acf774e19b155. Fixes: 249c9dc6aa0d ("iommu/arm: Cleanup resources in case of probe error path") Suggested-by: Will Deacon Signed-off-by: Marek

Re: [PATCH] iommu/arm: Cleanup resources in case of probe error path

2021-07-01 Thread Marek Szyprowski
On 01.07.2021 11:11, Robin Murphy wrote: > On 2021-07-01 10:01, Will Deacon wrote: >> On Thu, Jul 01, 2021 at 10:29:29AM +0200, Marek Szyprowski wrote: >>> Hi Robin, >>> >>> On 30.06.2021 16:01, Robin Murphy wrote: >>>> On 2021-06-30 14:48, M

Re: [PATCH] iommu/arm: Cleanup resources in case of probe error path

2021-07-01 Thread Marek Szyprowski
Hi Robin, On 30.06.2021 16:01, Robin Murphy wrote: > On 2021-06-30 14:48, Marek Szyprowski wrote: >> On 30.06.2021 14:59, Will Deacon wrote: >>> On Wed, Jun 30, 2021 at 02:48:15PM +0200, Marek Szyprowski wrote: >>>> On 08.06.2021 18:45, Amey Narkhede wrote: >

Re: [PATCH rdma-next v1 1/2] lib/scatterlist: Fix wrong update of orig_nents

2021-06-30 Thread Marek Szyprowski
eturn ERR_PTR(-ENOMEM); > sg_init_table(new_sg, alloc_size); > + table->total_nents += alloc_size; > if (cur) { > __sg_chain(next_sg, new_sg); > - table->orig_nents += alloc_size - 1; > } else { > table->sgl = new

Re: [PATCH] iommu/arm: Cleanup resources in case of probe error path

2021-06-30 Thread Marek Szyprowski
On 30.06.2021 14:59, Will Deacon wrote: > On Wed, Jun 30, 2021 at 02:48:15PM +0200, Marek Szyprowski wrote: >> On 08.06.2021 18:45, Amey Narkhede wrote: >>> If device registration fails, remove sysfs attribute >>> and if setting bus callbacks fails, unregister the devic

Re: [PATCH] iommu/arm: Cleanup resources in case of probe error path

2021-06-30 Thread Marek Szyprowski
s_set_iommu(_bus_type, _iommu_ops); > + ret = bus_set_iommu(_bus_type, _iommu_ops); > + if (ret) > + goto err_unregister_device; > > if (qcom_iommu->local_base) { > pm_runtime_get_sync(dev); > @@ -862,6 +864,13 @@ static int qcom_iommu_device_probe(stru

Re: [PATCH] iommu: qcom: Revert "iommu/arm: Cleanup resources in case of probe error path"

2021-07-06 Thread Marek Szyprowski
On 05.07.2021 16:30, Amey Narkhede wrote: > On 21/07/05 08:56AM, Marek Szyprowski wrote: >> QCOM IOMMU driver calls bus_set_iommu() for every IOMMU device controller, >> what fails for the second and latter IOMMU devices. This is intended and >> must be not fatal to the driver

Re: [PATCH] iommu: exynos: remove unneeded local variable initialization

2021-04-09 Thread Marek Szyprowski
On 08.04.2021 22:16, Krzysztof Kozlowski wrote: > The initialization of 'fault_addr' local variable is not needed as it is > shortly after overwritten. > > Addresses-Coverity: Unused value > Signed-off-by: Krzysztof Kozlowski Acked-by: Marek Szyprowski > --- > drivers

Re: [PATCH v4] iommu/of: Fix pci_request_acs() before enumerating PCI devices

2021-09-01 Thread Marek Szyprowski
> + if (of_property_read_bool(node, "iommu-map")) > + pci_request_acs(); > + > bridge->swizzle_irq = pci_common_swizzle; > bridge->map_irq = of_irq_parse_and_map_pci; > Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 01/25] iommu: Pull IOVA cookie management into the core

2021-08-05 Thread Marek Szyprowski
On 04.08.2021 19:15, Robin Murphy wrote: > Now that everyone has converged on iommu-dma for IOMMU_DOMAIN_DMA > support, we can abandon the notion of drivers being responsible for the > cookie type, and consolidate all the management into the core code. > > CC: Marek Szyprowski

Re: [PATCH v3 05/25] iommu/exynos: Drop IOVA cookie management

2021-08-05 Thread Marek Szyprowski
On 04.08.2021 19:15, Robin Murphy wrote: > The core code bakes its own cookies now. > > CC: Marek Szyprowski > Signed-off-by: Robin Murphy Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski > --- > > v3: Also remove unneeded include > --- > driver

Re: [PATCH] iommu/dma: Tidy up Kconfig selects

2021-09-28 Thread Marek Szyprowski
t is something for the future :) Maybe it would be a good motivation to get back to https://lore.kernel.org/linux-iommu/cover.1597931875.git.robin.mur...@arm.com/ :) Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list

Re: [PATCH 11/11] dma-direct: add a dma_direct_use_pool helper

2021-12-08 Thread Marek Szyprowski
alloc_pages(struct device *dev, > size_t size, > struct page *page; > void *ret; > > - if (force_dma_unencrypted(dev) && !gfpflags_allow_blocking(gfp) && > - !is_swiotlb_for_alloc(dev)) > + if (force_dma_unencrypte

Re: [RFC 2/3] iommu/samsung: Introduce Exynos sysmmu-v8 driver

2022-01-21 Thread Marek Szyprowski
g the initialization and different bits the page fault reason decoding. You must of course rely on the DMA-mapping framework and its implementation based on mainline DMA-IOMMU helpers. All the code for custom iommu group(s) handling or extended fault

Re: [PATCH 00/13] iommu: Retire bus_set_iommu()

2022-04-14 Thread Marek Szyprowski
device_iommu_capable() patches > here: > > https://lore.kernel.org/linux-iommu/cover.1649089693.git.robin.mur...@arm.com/ > > since those are pretty much good to go now (I'll send a slightly-tweaked > final version once the iommu/core branch is open). Works fine on Samsung Exynos

Re: [PATCH V2 2/6] iommu: iova: properly handle 0 as a valid IOVA address

2022-06-02 Thread Marek Szyprowski
Hi Robin, On 23.05.2022 19:30, Robin Murphy wrote: > On 2022-05-11 13:15, Ajay Kumar wrote: >> From: Marek Szyprowski >> >> Zero is a valid DMA and IOVA address on many architectures, so adjust >> the >> IOVA management code to properly handle it. A

[PATCH] iommu/exynos: Make driver independent of the system page size

2022-06-23 Thread Marek Szyprowski
PAGE_{SIZE,SHIFT} macros depend on the configured kernel's page size, but the driver expects values calculated as for 4KB pages. Fix this. Reported-by: Robin Murphy Signed-off-by: Marek Szyprowski --- Untested, because Exynos based boards I have doesn't boot with non-4KB page size for other

Re: [RFC 2/3] iommu/samsung: Introduce Exynos sysmmu-v8 driver

2022-06-22 Thread Marek Szyprowski
On 22.06.2022 11:14, Robin Murphy wrote: > On 2022-06-21 20:57, Sam Protsenko wrote: >> Hi Marek, >> >> On Fri, 21 Jan 2022 at 14:31, Marek Szyprowski >> wrote: >> >> [snip] >> >>> >>> Well, for starting point the existing exynos-

Re: [PATCH V2 2/6] iommu: iova: properly handle 0 as a valid IOVA address

2022-06-17 Thread Marek Szyprowski
Hi Robin, On 06.06.2022 14:38, Robin Murphy wrote: > On 2022-06-02 16:58, Marek Szyprowski wrote: >> On 23.05.2022 19:30, Robin Murphy wrote: >>> On 2022-05-11 13:15, Ajay Kumar wrote: >>>> From: Marek Szyprowski >>>> >>>> Zero is a valid

<    4   5   6   7   8   9