On Mon, May 2, 2022, at 11:22, Hector Martin wrote:
> This is required to make loading this as a module work.
>
> Signed-off-by: Hector Martin
this could probably use a
Fixes: 46d1fb072e76 ("iommu/dart: Add DART iommu driver")
but otherwise
Reviewed-by: Sven Pet
eref.
> And use devm_platform_get_and_ioremap_resource() to simplify code.
>
> Fixes: 46d1fb072e76 ("iommu/dart: Add DART iommu driver")
> Signed-off-by: Yang Yingliang
Reviewed-by: Sven Peter
Thanks,
Sven
___
iommu mailing list
i
On Thu, Apr 14, 2022, at 14:42, Robin Murphy wrote:
> Stop calling bus_set_iommu() since it's now unnecessary, and simplify
> the probe failure path accordingly.
>
> Signed-off-by: Robin Murphy
Tested-by: Sven Peter
Reviewed-by: Sven Peter
Can't wait until that saga is complet
It's the same people anyway.
Signed-off-by: Sven Peter
---
MAINTAINERS | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index fd768d43e048..5af879de869c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1375,14 +1375,6 @@ L: linux
The M1 Pro/Max SoCs come with a new variant of DART which supports a
larger physical address space with a slightly different PTE format.
Pass through the correct paddr address space size to the io-pgtable code
which will take care of the rest.
Signed-off-by: Sven Peter
---
drivers/iommu/apple
The M1 Max/Pro SoCs come with a new DART variant that is incompatible with
the previous one. Add a new compatible for those.
Signed-off-by: Sven Peter
---
Documentation/devicetree/bindings/iommu/apple,dart.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation
The DARTs present in the M1 Pro/Max SoC support a 42bit physical address
space by shifting the paddr and extending its mask inside the PTE.
Signed-off-by: Sven Peter
---
drivers/iommu/io-pgtable-arm.c | 30 +-
include/linux/io-pgtable.h | 2 ++
2 files changed
DART allows to only expose a subpage to the device. While this is an
optional feature on the M1 DARTs the new ones present on the Pro/Max
models require this field in every PTE.
Signed-off-by: Sven Peter
---
drivers/iommu/io-pgtable-arm.c | 10 ++
1 file changed, 10 insertions(+)
diff
SoCs using the LPAE format
with a large physical address space [1].
Sven
[1]
https://lore.kernel.org/linux-iommu/a2b45243-7e0a-a2ac-4e14-5256a3e7a...@arm.com/T/#t
Sven Peter (4):
dt-bindings: iommu: dart: add t6000 compatible
iommu/io-pgtable: Add DART subpage protection support
iommu/io
t;>> Lu Baolu wrote:
>>>>>
>>>>> On 10/20/21 10:22 PM, Marc Zyngier wrote:
>>>>>> On Wed, 20 Oct 2021 06:21:44 +0100,
>>>>>> Lu Baolu wrote:
>>>>>>>
>>>>>>> On 2021/10/20 0:37, Sve
On Wed, Oct 20, 2021, at 07:21, Lu Baolu wrote:
> On 2021/10/20 0:37, Sven Peter via iommu wrote:
>> The iova allocator is capable of handling any granularity which is a power
>> of two. Remove the much stronger condition that the granularity must be
>> smaller or equal
Now that the dma-iommu API supports IOMMU granules which are larger than
the CPU page size and that the kernel no longer runs into a BUG_ON when
devices are attached to a domain with such a granule there's no need to
force bypass mode anymore.
Signed-off-by: Sven Peter
---
drivers/iommu/apple
are not yet supported. Those require
additional changes to allow aligning swiotlb buffers to granularities
larger than PAGE_SIZE.
Signed-off-by: Sven Peter
---
drivers/iommu/iommu.c | 9 +++--
include/linux/iommu.h | 13 +++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff
-by: Sven Peter
---
drivers/iommu/iommu.c | 35 ---
drivers/iommu/iova.c | 7 ---
include/linux/iommu.h | 5 +
3 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index dd7863e453a5..28896739964b
. Some spillover pages might be
allocated at the end, which can however immediately be freed.
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 103 ++
1 file changed, 93 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers
Add support to iommu_dma_map_sg's impedance matching to also align
sg_lists correctly when the IOMMU granule is larger than PAGE_SIZE.
Co-developed-by: Robin Murphy
Signed-off-by: Robin Murphy
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 25 -
1 file
While this function *probably* works correctly without any changes for
granule > PAGE_SIZE I don't have any code to actually test it and cannot
reason about how the function is supposed to work.
Disable it instead until we run into a use case where it's required.
Signed-off-by: Sven Pe
s is essentially done by always mapping the encapsulating IOMMU page and
adjusting
the returned iova offset. There are also changes to only allow DMA domains to
make use
of this and prevent UNMANAGED domains from encountering unexpected situations.
Best,
Sven
Sven Peter (6):
iommu/dma: Dis
) however have some streams disabled initially. Make sure those
work by initializing DART_STREAMS_ENABLE during reset.
Reported-by: Martin PoviĊĦer
Signed-off-by: Sven Peter
---
While this could technically count as a fix I don't think it needs to go to
5.15 since no driver that requires
2 deletions(-)
Looks good to me, thanks!
Acked-by: Sven Peter
Sven
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Fixes: 46d1fb072e76b161 ("iommu/dart: Add DART iommu driver")
Reported-by: Marc Zyngier
Signed-off-by: Sven Peter
---
drivers/iommu/apple-dart.c | 38 +++---
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/apple-dart.c b/dri
iommu_release_device+0x50/0xa0
[...]
Fixes: 46d1fb072e76b161 ("iommu/dart: Add DART iommu driver")
Reported-by: Marc Zyngier
Signed-off-by: Sven Peter
---
drivers/iommu/apple-dart.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/drivers/iommu/apple-dart.c b/dri
On Fri, Sep 3, 2021, at 17:45, Robin Murphy wrote:
> On 2021-09-03 16:16, Sven Peter wrote:
> >
> >
> > On Thu, Sep 2, 2021, at 21:42, Robin Murphy wrote:
> >> On 2021-09-02 19:19, Sven Peter wrote:
> >>>
> >>>
> >>> On Wed,
On Thu, Sep 2, 2021, at 21:42, Robin Murphy wrote:
> On 2021-09-02 19:19, Sven Peter wrote:
> >
> >
> > On Wed, Sep 1, 2021, at 23:10, Alyssa Rosenzweig wrote:
> >>> My biggest issue is that I do not understand how this function is supposed
> >>
On Wed, Sep 1, 2021, at 23:10, Alyssa Rosenzweig wrote:
> > My biggest issue is that I do not understand how this function is supposed
> > to be used correctly. It would work fine as-is if it only ever gets passed
> > buffers
> > allocated by the coherent API but there's not way to check or
On Tue, Aug 31, 2021, at 23:39, Alyssa Rosenzweig wrote:
> > + if ((1 << __ffs(domain->pgsize_bitmap)) > PAGE_SIZE) {
>
> Not a fan of this construction. Could you assign `(1 <<
> __ffs(domain->pgsize_bitmap))` to an appropriately named temporary (e.g
> min_io_pgsize) so it's clearer what's
result will be a single contiguous block in IOVA space and
doesn't required the sgt roundtrip.
Sven
> On Sat, Aug 28, 2021 at 05:36:37PM +0200, Sven Peter wrote:
> > Pretend that iommu_dma_get_sgtable is not implemented when
> > granule > PAGE_SIZE since I can neither test
, Aug 28, 2021, at 17:36, Sven Peter wrote:
> If swiotlb is enabled we should never try to create any mappings that
> would expose more memory than requested to the device.
> WARN_ON and refuse those mappings just in case.
>
> Signed-off-by: Sven Peter
> ---
> drivers/
Now that the dma-iommu API supports IOMMU granules which are larger than
the CPU page size and that the kernel no longer runs into a BUG_ON when
devices are attached to a domain with such a granule there's no need to
force bypass mode anymore.
Signed-off-by: Sven Peter
---
drivers/iommu/apple
__IOMMU_DOMAIN_LP (large pages) indicates that a domain can handle
conditions where PAGE_SIZE might be smaller than the IOMMU page size.
Always allow attaching devices to such domains and set the flag for
IOMMU_DOMAIN_DMA, which can now handle these situations.
Signed-off-by: Sven Peter
-by: Sven Peter
---
drivers/iommu/iommu.c | 34 +++---
drivers/iommu/iova.c | 7 ---
2 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index b4499b1915fa..f02b727d3054 100644
--- a/drivers/iommu/iommu.c
Add support to iommu_dma_map_sg's impedance matching to also align
sg_lists correctly when the IOMMU granule is larger than PAGE_SIZE.
Co-developed-by: Robin Murphy
Signed-off-by: Robin Murphy
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 18 ++
1 file changed, 10
. Some spillover pages might be
allocated at the end, which can however immediately be freed.
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 99 +++
1 file changed, 89 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers
Pretend that iommu_dma_get_sgtable is not implemented when
granule > PAGE_SIZE since I can neither test this function right now
nor do I fully understand how it is used.
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/driv
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 40 ++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index d0bc8c06e1a4..e8eae34e9e4f 100644
--- a/drivers/iommu/dma-iommu.c
+
If swiotlb is enabled we should never try to create any mappings that
would expose more memory than requested to the device.
WARN_ON and refuse those mappings just in case.
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 9 -
1 file changed, 8 insertions(+), 1 deletion
lso on
iommu/core). It won't apply cleanly on apple/dart since it already takes
Robin's DMA domain
cleanup series into account.
Best,
Sven
Sven Peter (8):
iommu/dma: Align size for untrusted devs to IOVA granule
iommu/dma: Fail unaligned map requests for untrusted devs
iommu/dma: Disa
Just tested your branch and everything works. Feel free to add
Acked-by: Sven Peter
Tested-by: Sven Peter
Best,
Sven
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
On Thu, Aug 12, 2021, at 13:29, Joerg Roedel wrote:
> Hi Sven,
>
> On Tue, Aug 10, 2021 at 08:09:53AM +0200, Sven Peter wrote:
> > This happens because apple/dart is missing the "Optimizing
> > iommu_[map/unmap] performance"
> > series which is already
On Tue, Aug 10, 2021, at 11:51, Robin Murphy wrote:
> On 2021-08-09 21:45, Sven Peter wrote:
> >
> >
> > On Mon, Aug 9, 2021, at 19:41, Robin Murphy wrote:
> >> On 2021-08-07 12:47, Sven Peter via iommu wrote:
> >>>
> >>>
> >>>
Good catch, thanks!
Acked-by: Sven Peter
Sven
On Tue, Aug 10, 2021, at 15:47, Geert Uytterhoeven wrote:
> The Apple DART (Device Address Resolution Table) IOMMU is only present
> on Apple ARM SoCs like the M1. Hence add a dependency on ARCH_APPLE, to
> prevent asking the u
evice_group,
>738.of_xlate = apple_dart_of_xlate,
> 739 .def_domain_type = apple_dart_def_domain_type,
>740.pgsize_bitmap = -1UL, /* Restricted during dart probe
> */
>741};
>742
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
>
> Attachments:
> * .config.gz
--
Sven Peter
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
On Mon, Aug 9, 2021, at 19:41, Robin Murphy wrote:
> On 2021-08-07 12:47, Sven Peter via iommu wrote:
> >
> >
> > On Fri, Aug 6, 2021, at 20:04, Robin Murphy wrote:
> >> On 2021-08-06 16:55, Sven Peter via iommu wrote:
> >>> @@ -1006,6 +1019,31 @@
Hi,
On Mon, Aug 9, 2021, at 20:37, Robin Murphy wrote:
> On 2021-08-07 09:41, Sven Peter wrote:
> > Hi,
> >
> > Thanks a lot for quick reply!
> >
> > On Fri, Aug 6, 2021, at 20:04, Robin Murphy wrote:
> >> On 2021-08-06 16:55, Sven Peter via iommu
On Fri, Aug 6, 2021, at 20:04, Robin Murphy wrote:
> On 2021-08-06 16:55, Sven Peter via iommu wrote:
> > @@ -1006,6 +1019,31 @@ static int iommu_dma_map_sg(struct device *dev,
> > struct scatterlist *sg,
> > if (dev_is_untrusted(dev))
> > return i
Hi,
Thanks a lot for quick reply!
On Fri, Aug 6, 2021, at 20:04, Robin Murphy wrote:
> On 2021-08-06 16:55, Sven Peter via iommu wrote:
> > DMA IOMMU domains can support hardware where the IOMMU page size is
> > larger than the CPU page size.
> > Alignments need to be done
ory as requested and will leave
it unused :-(
The other issue I'm aware of is v4l2 which expects that a page-aligned sglist
can be represented contiguously in IOVA space [1].
Best,
Sven
[1]
https://lore.kernel.org/linux-iommu/0d20bd6b-d0a1-019c-6398-b12f83f4f...@arm.com/
Sven Peter (3):
iommu: M
__IOMMU_DOMAIN_LARGE_PAGES indicates that a domain can handle
conditions where PAGE_SIZE might be smaller than the IOMMU page size.
Always allow attaching devices to such domains and set the flag for
IOMMU_DOMAIN_DMA, which can now handle these situations.
Signed-off-by: Sven Peter
---
drivers
cal
addresses will very likely not be aligned to the larger IOMMU page size.
Signed-off-by: Sven Peter
---
drivers/iommu/dma-iommu.c | 87 ++-
1 file changed, 77 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
in
-by: Sven Peter
---
drivers/iommu/iommu.c | 34 +++---
drivers/iommu/iova.c | 7 ---
2 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 1de503ddb343..5854a4ef5681 100644
--- a/drivers/iommu/iommu.c
Apple's new SoCs use iommus for almost all peripherals. These Device
Address Resolution Tables must be setup before these peripherals can
act as DMA masters.
Tested-by: Alyssa Rosenzweig
Signed-off-by: Sven Peter
---
MAINTAINERS| 1 +
drivers/iommu/Kconfig | 14
Rosenzweig
Reviewed-by: Robin Murphy
Signed-off-by: Sven Peter
---
drivers/iommu/io-pgtable-arm.c | 63 ++
drivers/iommu/io-pgtable.c | 1 +
include/linux/io-pgtable.h | 7
3 files changed, 71 insertions(+)
diff --git a/drivers/iommu/io-pgtable
DART (Device Address Resolution Table) is the iommu found on Apple
ARM SoCs such as the M1.
Reviewed-by: Rob Herring
Reviewed-by: Alyssa Rosenzweig
Signed-off-by: Sven Peter
---
.../devicetree/bindings/iommu/apple,dart.yaml | 81 +++
MAINTAINERS
86ddeb46ec29d7feb
[6]
https://github.com/AsahiLinux/m1n1/commit/9529ec2b4fd6550f9cfd66d9f2448b90804699a1
[7]
https://lore.kernel.org/linux-iommu/20210627143405.77298-1-s...@svenpeter.dev/
Sven Peter (3):
iommu/io-pgtable: Add DART pagetable format
dt-bindings: iommu: add DART iommu bindings
On Mon, Jul 19, 2021, at 20:15, Robin Murphy wrote:
> On 2021-07-15 17:41, Sven Peter via iommu wrote:
> [...]
> >>> + u64 sw_bypass_cpu_start;
> >>> + u64 sw_bypass_dma_start;
> >>> + u64 sw_bypass_len;
> >>> +
> >>> + struct
> On 2021-06-27 15:34, Sven Peter wrote:
> > Apple's new SoCs use iommus for almost all peripherals. These Device
> > Address Resolution Tables must be setup before these peripherals can
> > act as DMA masters.
> >
> > Signed-off-by: Sven Peter
> > ---
> &
Hi,
On Tue, Jul 13, 2021, at 21:17, Robin Murphy wrote:
> On 2021-06-27 15:34, Sven Peter wrote:
> > Apple's DART iommu uses a pagetable format that shares some
> > similarities with the ones already implemented by io-pgtable.c.
> > Add a new format variant to support the
Hi,
On Wed, Jun 30, 2021, at 15:49, Alyssa Rosenzweig wrote:
> Looks really good! Just a few minor comments. With them addressed,
>
> Reviewed-by: Alyssa Rosenzweig
Thanks!
>
> > + Say Y here if you are using an Apple SoC with a DART IOMMU.
>
> Nit: Do we need to spell out "with
On Mon, Jun 28, 2021, at 12:54, Alexander Graf wrote:
>
>
> On 27.06.21 16:34, Sven Peter wrote:
> >
> > Apple's DART iommu uses a pagetable format that shares some
> > similarities with the ones already implemented by io-pgtable.c.
> > Add a new forma
Apple's new SoCs use iommus for almost all peripherals. These Device
Address Resolution Tables must be setup before these peripherals can
act as DMA masters.
Signed-off-by: Sven Peter
---
MAINTAINERS |1 +
drivers/iommu/Kconfig| 15 +
drivers/iommu
DART (Device Address Resolution Table) is the iommu found on Apple
ARM SoCs such as the M1.
Reviewed-by: Rob Herring
Signed-off-by: Sven Peter
---
.../devicetree/bindings/iommu/apple,dart.yaml | 81 +++
MAINTAINERS | 6 ++
2 files changed, 87
art/dev
[7]
https://github.com/AsahiLinux/m1n1/commit/9529ec2b4fd6550f9cfd66d9f2448b90804699a1
Sven Peter (3):
iommu: io-pgtable: add DART pagetable format
dt-bindings: iommu: add DART iommu bindings
iommu: dart: Add DART iommu driver
.../devicetree/bindings/iommu/apple,dart.yaml | 81 ++
M
Apple's DART iommu uses a pagetable format that shares some
similarities with the ones already implemented by io-pgtable.c.
Add a new format variant to support the required differences
so that we don't have to duplicate the pagetable handling code.
Signed-off-by: Sven Peter
---
drivers/iommu/io
Hi,
On Thu, Jun 10, 2021, at 18:52, Rob Herring wrote:
> On Thu, Jun 03, 2021 at 10:50:02AM +0200, Sven Peter wrote:
> > +
> > +examples:
> > + - |+
> > +dart1: iommu@82f8 {
> > + compatible = "apple,t8103-dart";
> > + reg = <
Hi Rouven,
On Sat, Jun 5, 2021, at 13:50, Rouven Czerwinski wrote:
> Hi Sven,
>
> just a small comment, see inline.
>
> On Thu, 2021-06-03 at 10:50 +0200, Sven Peter wrote:
> > +
> > +/* must be called with held dart_domain->lock */
>
> You can re
Apple's new SoCs use iommus for almost all peripherals. These Device
Address Resolution Tables must be setup before these peripherals can
act as DMA masters.
Signed-off-by: Sven Peter
---
MAINTAINERS | 1 +
drivers/iommu/Kconfig| 15 +
drivers/iommu/Makefile
Apple's DART iommu uses a pagetable format that shares some
similarities with the ones already implemented by io-pgtable.c.
Add a new format variant to support the required differences
so that we don't have to duplicate the pagetable handling code.
Signed-off-by: Sven Peter
---
drivers/iommu/io
DART (Device Address Resolution Table) is the iommu found on Apple
ARM SoCs such as the M1.
Signed-off-by: Sven Peter
---
.../devicetree/bindings/iommu/apple,dart.yaml | 81 +++
MAINTAINERS | 6 ++
2 files changed, 87 insertions(+)
create mode
y s/DOMAIN/STREAM/ to
prevent confusion with linux's iommu domain concept).
[1] v1:
https://lore.kernel.org/linux-iommu/20210320151903.60759-1-s...@svenpeter.dev/
[2] v2:
https://lore.kernel.org/linux-iommu/20210328074009.95932-1-s...@svenpeter.dev/
Sven Peter (3):
iommu: io-pgtable: add DART
Hi,
I just ran into the exact same issue while working on the M1 DART IOMMU driver
and it was fixed by this commit. Thanks!
Would be great if this could be picked up.
Tested-by: Sven Peter
Best,
Sven
On Mon, Sep 14, 2020, at 09:23, Srinath Mannam via iommu wrote:
> Fix IOVA rese
On Sun, Apr 4, 2021, at 17:26, Julia Lawall wrote:
> From: kernel test robot
>
> Function apple_dart_attach_stream called on line 519 inside
> lock on line 509 but uses GFP_KERNEL
Thanks! Fixed for v3.
Best,
Sven
___
iommu mailing list
On Wed, Apr 7, 2021, at 12:44, Will Deacon wrote:
> On Sun, Mar 28, 2021 at 09:40:07AM +0200, Sven Peter wrote:
[...]
> >
> > +static struct io_pgtable *
> > +apple_dart_alloc_pgtable(struct io_pgtable_cfg *cfg, void *cookie)
> > +{
> > +
On Wed, Apr 7, 2021, at 12:42, Will Deacon wrote:
> On Sun, Mar 28, 2021 at 09:40:09AM +0200, Sven Peter wrote:
> > Apple's new SoCs use iommus for almost all peripherals. These Device
> > Address Resolution Tables must be setup before these peripherals can
> &g
On Sun, Mar 28, 2021, at 10:16, Arnd Bergmann wrote:
> On Sun, Mar 28, 2021 at 9:40 AM Sven Peter wrote:
>
> I noticed only one detail here:
>
> > + - |+
> > +dart2a: dart2a@82f0 {
> > + compatible = "apple,t8103-dart&qu
Apple's new SoCs use iommus for almost all peripherals. These Device
Address Resolution Tables must be setup before these peripherals can
act as DMA masters.
Signed-off-by: Sven Peter
---
MAINTAINERS | 1 +
drivers/iommu/Kconfig| 14 +
drivers/iommu/Makefile
DART (Device Address Resolution Table) is the iommu found on Apple
ARM SoCs such as the M1.
Signed-off-by: Sven Peter
---
.../devicetree/bindings/iommu/apple,dart.yaml | 81 +++
MAINTAINERS | 6 ++
2 files changed, 87 insertions(+)
create mode
github.com/svenpeter42/m1n1/tree/usb-dwc3-serial-wip
Sven Peter (3):
iommu: io-pgtable: add DART pagetable format
dt-bindings: iommu: add DART iommu bindings
iommu: dart: Add DART iommu driver
.../devicetree/bindings/iommu/apple,dart.yaml | 81 ++
MAINTAINERS | 7
Apple's DART iommu uses a pagetable format that shares some
similarities with the ones already implemented by io-pgtable.c.
Add a new format variant to support the required differences
so that we don't have to duplicate the pagetable handling code.
Signed-off-by: Sven Peter
---
drivers/iommu/io
Hi Robin,
On Thu, Mar 25, 2021, at 12:50, Robin Murphy wrote:
> On 2021-03-25 07:53, Sven Peter wrote:
> > The iommu binding documentation [1] mentions that
> >
> > The device tree node of the IOMMU device's parent bus must contain a
> > valid
> > &qu
On Fri, Mar 26, 2021, at 20:59, Arnd Bergmann wrote:
> On Fri, Mar 26, 2021 at 6:51 PM Sven Peter wrote:
> > dart-sio: 0021c000 fbde4000 (at least their Secure Enclave/TPM
> > co-processor)
>
> Same here:
> dart-sio {
>vm-base = <0x0>
On Fri, Mar 26, 2021, at 18:34, Robin Murphy wrote:
> On 2021-03-26 17:26, Mark Kettenis wrote:
> >
> > Anyway, from my viewpoint having the information about the IOVA
> > address space sit on the devices makes little sense. This information
> > is needed by the DART driver, and there is no
On Fri, Mar 26, 2021, at 17:38, Arnd Bergmann wrote:
> On Fri, Mar 26, 2021 at 5:10 PM Sven Peter wrote:
> > On Fri, Mar 26, 2021, at 16:59, Mark Kettenis wrote:
> > > Some of the DARTs provide a bypass facility. That code make using the
> > > standard &
On Fri, Mar 26, 2021, at 16:59, Mark Kettenis wrote:
> Some of the DARTs provide a bypass facility. That code make using the
> standard "dma-ranges" property tricky. That property would need to
> contain the bypass address range. But that would mean that if the
> DART driver needs to look at
On Thu, Mar 25, 2021, at 12:50, Robin Murphy wrote:
> On 2021-03-25 07:53, Sven Peter wrote:
> >
> >
> > On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote:
> >> On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote:
> >>>
> >>> As
Hi Robin,
Thanks for the review!
On Wed, Mar 24, 2021, at 17:37, Robin Murphy wrote:
> On 2021-03-20 15:19, Sven Peter wrote:
> > Apple's DART iommu uses a pagetable format that's very similar to the ones
> > already implemented by io-pgtable.c.
> > Add a new form
Hi Robin,
On Wed, Mar 24, 2021, at 16:29, Robin Murphy wrote:
> On 2021-03-20 15:19, Sven Peter wrote:
> >
> > I have just noticed today though that at least the USB DWC3 controller in
> > host
> > mode uses *two* darts at the same time. I'm not sure yet which part
On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote:
> On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote:
> > > Date: Sat, 20 Mar 2021 15:19:33 +
> > > From: Sven Peter
> > > I have just noticed today though that at least the USB DWC3 controller
Hi Mark,
On Tue, Mar 23, 2021, at 21:00, Mark Kettenis wrote:
> The problem with both #1 and #2 is that you end up with two references
> to (effectively) different iommu's in the dwc3 device node. I don't
> see how that is compatible with the idea of using a single translation
> table for both
Hi Mark,
On Sun, Mar 21, 2021, at 19:35, Mark Kettenis wrote:
>
> Guess we do need to understand a little bit better how the USB DART
> actually works. My hypothesis (based on our discussion on #asahi) is
> that the XHCI host controller and the peripheral controller of the
> DWC3 block use
Hi Rob,
On Mon, Mar 22, 2021, at 01:15, Rob Herring wrote:
>
> This check can fail if there are any dependencies. The base for a patch
> series is generally the most recent rc1.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is
Hi Mark,
> On 21. Mar 2021, at 17:00, Mark Kettenis wrote:
>
> I don't think the first option is going to work for PCIe. PCIe
> devices will have to use "iommu-map" properties to map PCI devices to
> the right iommu, and the currently implementation seems to assume that
> #iommu-cells = <1>.
Hi Mark,
Sorry for the spam if you get this message twice. This is pretty embarrassing
but I've just switched mail providers after ProtonMail messed up yesterday and
it looks like my new one defaulted to sending HTML messages even though I only
typed plaintext. This shouldn't have happened in
Hi,
After Hector's initial work [1] to bring up Linux on Apple's M1 it's time to
bring up more devices. Most peripherals connected to the SoC are behind a iommu
which Apple calls "Device Address Resolution Table", or DART for short [2].
Unfortunately, it only shares the name with PowerPC's DART.
Apple's new SoCs use iommus for almost all peripherals. These Device
Address Resolution Tables must be setup before these peripherals can
act as DMA masters.
Signed-off-by: Sven Peter
---
MAINTAINERS | 1 +
drivers/iommu/Kconfig| 13 +
drivers/iommu/Makefile
Apple's DART iommu uses a pagetable format that's very similar to the ones
already implemented by io-pgtable.c.
Add a new format variant to support the required differences.
Signed-off-by: Sven Peter
---
drivers/iommu/Kconfig | 13 +++
drivers/iommu/io-pgtable-arm.c | 70
DART (Device Address Resolution Table) is the iommu found on Apple
ARM SoCs such as the M1.
Signed-off-by: Sven Peter
---
.../bindings/iommu/apple,t8103-dart.yaml | 82 +++
MAINTAINERS | 6 ++
2 files changed, 88 insertions(+)
create mode
96 matches
Mail list logo