linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] iommu: M1 Pro/Max DART support
@ 2022-05-03  6:22 Janne Grunau
  2022-05-03  6:22 ` [PATCH v2 1/4] dt-bindings: iommu: dart: add t6000 compatible Janne Grunau
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Janne Grunau @ 2022-05-03  6:22 UTC (permalink / raw)
  To: iommu
  Cc: Sven Peter, Alyssa Rosenzweig, Hector Martin, Mark Kettenis,
	Joerg Roedel, Will Deacon, Rob Herring, Robin Murphy, devicetree,
	linux-kernel, linux-arm-kernel

Hej,

I've taken over this series to add support for DART on M1 Pro/Max from
Sven.

Since v1 we have discovered further differences in the PTE format. It
has four differences which makes it incompatible with the one in the
M1:

  - the physical addresses are shifted left by 4 bits and and have 2 more
    bits inside the PTE entries
  - the read/write protection flags are at a different position
  - the subpage protection feature is now mandatory. For Linux we can
    just configure it to always allow access to the entire page.
  - BIT(1) tags "uncached" mappings (used for the display controller)

The last difference is the most troublesome since it makes the PTE format
incomaptible with iopte_type(). Handling this inside io-pgtable-arm.c
seems manageable since DART supports just a single block size. It opens
the question at which point we decide that DART uses its own
io_pgtable_ops.

There is second type of DART (t8110) present on M1 Pro/Max SoCs which
uses the same PTE format as t6000.

Janne

Sven Peter (4):
  dt-bindings: iommu: dart: add t6000 compatible
  iommu/io-pgtable: Add DART subpage protection support
  iommu/io-pgtable: Add DART PTE support for t6000
  iommu: dart: Support t6000 variant

 .../devicetree/bindings/iommu/apple,dart.yaml |  4 +-
 drivers/iommu/apple-dart.c                    | 24 +++++-
 drivers/iommu/io-pgtable-arm.c                | 76 ++++++++++++++++++-
 drivers/iommu/io-pgtable.c                    |  1 +
 include/linux/io-pgtable.h                    |  3 +
 5 files changed, 101 insertions(+), 7 deletions(-)


base-commit: 3123109284176b1532874591f7c81f3837bbdc17
-- 
2.35.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-03  6:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03  6:22 [PATCH v2 0/4] iommu: M1 Pro/Max DART support Janne Grunau
2022-05-03  6:22 ` [PATCH v2 1/4] dt-bindings: iommu: dart: add t6000 compatible Janne Grunau
2022-05-03  6:22 ` [PATCH v2 2/4] iommu/io-pgtable: Add DART subpage protection support Janne Grunau
2022-05-03  6:23 ` [PATCH v2 3/4] iommu/io-pgtable: Add DART PTE support for t6000 Janne Grunau
2022-05-03  6:23 ` [PATCH v2 4/4] iommu: dart: Support t6000 variant Janne Grunau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).