All of lore.kernel.org
 help / color / mirror / Atom feed
* SMR masking and PCI
@ 2016-10-27 17:10 ` Stuart Yoder
  0 siblings, 0 replies; 14+ messages in thread
From: Stuart Yoder @ 2016-10-27 17:10 UTC (permalink / raw)
  To: Robin Murphy
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Will Deacon,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org

Hi Robin,

A question about how the SMR masking defined in the arm,smmu binding
relates to the PCI iommu-map.

The #iommu-cells property defines the number of cells an "IOMMU specifier"
takes and 2 is specified to be:

   SMMUs with stream matching support and complex masters
   may use a value of 2, where the second cell represents
   an SMR mask to combine with the ID in the first cell.

An iommu-map entry is defined as:

   (rid-base,iommu,iommu-base,length)

What seems to be currently missing in the iommu-map support is
the possibility the case where #iommu-cells=<2>.

In this case iommu-base which is an IOMMU specifier should
occupy 2 cells.  For example on an ls2085a we would want:

	iommu-map = <0x0   0x6 0x7 0x3ff 0x1
		       0x100 0x6 0x8 0x3ff 0x1>;

...to mask our stream IDs to 10 bits.

This should work in theory and comply with the bindings, no?

of_pci_map_rid() seems to have a hardcoded assumption that
each field in the map is 4 bytes.

(Also, I guess that msi-map is not affected by this since it
is not related to the IOMMU...but we do have common code
handling both maps.)

Thanks,
Stuart

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

end of thread, other threads:[~2016-10-31 18:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 17:10 SMR masking and PCI Stuart Yoder
2016-10-27 17:10 ` Stuart Yoder
     [not found] ` <VI1PR0401MB26389CC8820C9654337B578E8DAA0-9IDQY6o3qQjcXZ0H4ZLnAo3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2016-10-28 16:16   ` Robin Murphy
2016-10-28 16:16     ` Robin Murphy
     [not found]     ` <c39b785a-0f18-fc0a-ce08-7ebe3cfaf8c5-5wv7dgnIgG8@public.gmane.org>
2016-10-28 17:12       ` Stuart Yoder
2016-10-28 17:12         ` Stuart Yoder
2016-10-28 17:43       ` Mark Rutland
2016-10-28 17:43         ` Mark Rutland
2016-10-28 18:38     ` Stuart Yoder
2016-10-28 18:38       ` Stuart Yoder
2016-10-31 15:57     ` Diana Madalina Craciun
2016-10-31 15:57       ` Diana Madalina Craciun
     [not found]       ` <HE1PR04MB1321DED0E75BD607BB52889EFFAE0-6LN7OEpIatWwb60icsfScs9NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-10-31 18:36         ` Robin Murphy
2016-10-31 18:36           ` Robin Murphy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.