Hello, The SMMU drivers has diverged from Linux. Having our own driver doesn't make any benefits and make difficult to backport fixes and/or porting features such as PCI.
With this series, the core of the SMMU drivers (i.e copied from Linux) is mostly not modified. If it's the case a comment /* Xen: ... */ has been added to explain why. To make the change obvious the resync of the SMMU code is mode in several step: 1) Revert the current SMMU driver (patch #6) 2) Import as it is the driver from Linux (patch #10) 3) Apply 2 fixes useful to correctly use the SATA with the SMMU on calxeda. I don't know why Linux didn't yet applied (patch #11-12) 4) Changes for Xen (patch #13) I also took the opportunity of the resync to consolidate the iommu ops in a single set. When I added the IOMMU set to handle device tree passthrough ( ops assign_dt_device and reassign_dt_device), I didn't think about merging the ops with the PCI one. In fact Linux is using a single set and have only few lines per driver specific to each set (PCI or device tree). A branch is available with all the changes: git://xenbits.xen.org/people/julieng/xen-unstable.git branch smmu-rework Sincerely yours, Andreas Herrmann (2): xen/iommu: smmu: Check for duplicate stream IDs when registering master devices xen/iommu: smmu: Introduce automatic stream-id-masking Julien Grall (11): xen/arm: gic-v2: Change the device name in DT_DEVICE_START xen/arm: vgic: Drop unecessary include asm/device.h xen: Introduce ACCESS_ONCE macro xen/dt: Extend dt_device_match to possibly store data xen/arm: device: Rename device_type into device_match xen/iommu: arm: Remove temporary the SMMU driver xen: Introduce a generic way to describe device xen/iommu: Consolidate device assignment ops into a single set xen/arm: Describe device supported by a driver with dt_match_node xen/iommu: arm: Import the SMMU driver from Linux xen/iommu: smmu: Add Xen specific code to be able to use the driver xen/arch/arm/device.c | 27 +- xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/gic-v2.c | 15 +- xen/arch/arm/gic-v3.c | 10 +- xen/arch/arm/gic.c | 2 +- xen/arch/arm/platform.c | 2 +- xen/arch/arm/vgic-v2.c | 1 - xen/arch/arm/vgic-v3.c | 1 - xen/common/Makefile | 1 + xen/common/device.c | 21 + xen/common/device_tree.c | 13 +- xen/drivers/char/dt-uart.c | 4 +- xen/drivers/char/exynos4210-uart.c | 10 +- xen/drivers/char/ns16550.c | 14 +- xen/drivers/char/omap-uart.c | 10 +- xen/drivers/char/pl011.c | 10 +- xen/drivers/passthrough/amd/pci_amd_iommu.c | 14 +- xen/drivers/passthrough/arm/iommu.c | 2 +- xen/drivers/passthrough/arm/smmu.c | 4107 +++++++++++++++++---------- xen/drivers/passthrough/device_tree.c | 5 +- xen/drivers/passthrough/pci.c | 22 +- xen/drivers/passthrough/vtd/iommu.c | 19 +- xen/include/asm-arm/device.h | 19 +- xen/include/asm-arm/gic.h | 15 +- xen/include/asm-x86/device.h | 17 + xen/include/xen/compiler.h | 14 + xen/include/xen/device.h | 40 + xen/include/xen/device_tree.h | 19 +- xen/include/xen/iommu.h | 18 +- xen/include/xen/pci.h | 12 + 30 files changed, 2843 insertions(+), 1623 deletions(-) create mode 100644 xen/common/device.c create mode 100644 xen/include/asm-x86/device.h create mode 100644 xen/include/xen/device.h -- 2.1.3 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel