[PATCH v2] swiotlb: Make SWIOTLB_NO_FORCE perform no allocation

2021-03-20 Thread Florian Fainelli
When SWIOTLB_NO_FORCE is used, there should really be no allocations of default_nslabs to occur since we are not going to use those slabs. If a platform was somehow setting swiotlb_no_force and a later call to swiotlb_init() was to be made we would still be proceeding with allocating the default

[PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-20 Thread Sven Peter via iommu
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.

[PATCH 3/3] iommu: dart: Add DART iommu driver

2021-03-20 Thread Sven Peter via iommu
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

[PATCH 1/3] iommu: io-pgtable: add DART pagetable format

2021-03-20 Thread Sven Peter via iommu
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

[PATCH 2/3] dt-bindings: iommu: add DART iommu bindings

2021-03-20 Thread Sven Peter via iommu
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