From: Joerg Roedel Date: Tue, 2 Dec 2014 12:07:13 +0000 (+0100) Subject: Merge branches 'arm/omap', 'arm/msm', 'arm/rockchip', 'arm/renesas', 'arm/smmu',... X-Git-Tag: v3.19-rc1~99^2 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=76771c938e95ce4106c6e8092f4f614d4d1e0ecc;p=cascardo%2Flinux.git Merge branches 'arm/omap', 'arm/msm', 'arm/rockchip', 'arm/renesas', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next Conflicts: drivers/iommu/arm-smmu.c --- 76771c938e95ce4106c6e8092f4f614d4d1e0ecc diff --cc drivers/iommu/Kconfig index 1d54996b6a70,dd5112265cc9,f6f259af653c,dd5112265cc9,dd5112265cc9,dd5112265cc9,dd5112265cc9,dd5112265cc9..22f15f9951e7 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@@@@@@@@ -144,14 -144,14 -144,27 -144,14 -144,14 -144,14 -144,14 -144,14 +144,27 @@@@@@@@@ config OMAP_IOMM select IOMMU_API config OMAP_IOMMU_DEBUG ------- tristate "Export OMAP IOMMU internals in DebugFS" ------- depends on OMAP_IOMMU && DEBUG_FS ------- help ------- Select this to see extensive information about ------- the internal state of OMAP IOMMU in debugfs. +++++++ bool "Export OMAP IOMMU internals in DebugFS" +++++++ depends on OMAP_IOMMU && DEBUG_FS +++++++ ---help--- +++++++ Select this to see extensive information about +++++++ the internal state of OMAP IOMMU in debugfs. + +++++ - Say N unless you know you need this. +++++++ Say N unless you know you need this. - ----- Say N unless you know you need this. ++ +++++config ROCKCHIP_IOMMU ++ +++++ bool "Rockchip IOMMU Support" ++ +++++ depends on ARM ++ +++++ depends on ARCH_ROCKCHIP || COMPILE_TEST ++ +++++ select IOMMU_API ++ +++++ select ARM_DMA_USE_IOMMU ++ +++++ help ++ +++++ Support for IOMMUs found on Rockchip rk32xx SOCs. ++ +++++ These IOMMUs allow virtualization of the address space used by most ++ +++++ cores within the multimedia subsystem. ++ +++++ Say Y here if you are using a Rockchip SoC that includes an IOMMU ++ +++++ device. + config TEGRA_IOMMU_GART bool "Tegra GART IOMMU Support" depends on ARCH_TEGRA_2x_SOC diff --cc drivers/iommu/Makefile index 18fa446a4ffa,16edef74b8ee,3e47ef35a35f,16edef74b8ee,16edef74b8ee,16edef74b8ee,16edef74b8ee,16edef74b8ee..7b976f294a69 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile @@@@@@@@@ -11,7 -11,8 -11,9 -11,8 -11,8 -11,8 -11,8 -11,8 +11,8 @@@@@@@@@ obj-$(CONFIG_INTEL_IOMMU) += iova.o int obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o -------obj-$(CONFIG_OMAP_IOMMU) += omap-iommu2.o obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o ++ +++++obj-$(CONFIG_ROCKCHIP_IOMMU) += rockchip-iommu.o obj-$(CONFIG_TEGRA_IOMMU_GART) += tegra-gart.o obj-$(CONFIG_TEGRA_IOMMU_SMMU) += tegra-smmu.o obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o diff --cc drivers/iommu/arm-smmu.c index 60558f794922,60558f794922,60558f794922,60558f794922,7a80f710ba2d,60558f794922,60558f794922,e393ae01b5d2..b8aac1389a96 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@@@@@@@@ -1644,20 -1644,20 -1644,20 -1644,20 -1681,56 -1644,20 -1644,20 -1644,21 +1681,57 @@@@@@@@@ static void arm_smmu_remove_device(stru iommu_group_remove_device(dev); } ++++ +++static int arm_smmu_domain_get_attr(struct iommu_domain *domain, ++++ +++ enum iommu_attr attr, void *data) ++++ +++{ ++++ +++ struct arm_smmu_domain *smmu_domain = domain->priv; ++++ +++ ++++ +++ switch (attr) { ++++ +++ case DOMAIN_ATTR_NESTING: ++++ +++ *(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED); ++++ +++ return 0; ++++ +++ default: ++++ +++ return -ENODEV; ++++ +++ } ++++ +++} ++++ +++ ++++ +++static int arm_smmu_domain_set_attr(struct iommu_domain *domain, ++++ +++ enum iommu_attr attr, void *data) ++++ +++{ ++++ +++ struct arm_smmu_domain *smmu_domain = domain->priv; ++++ +++ ++++ +++ switch (attr) { ++++ +++ case DOMAIN_ATTR_NESTING: ++++ +++ if (smmu_domain->smmu) ++++ +++ return -EPERM; ++++ +++ if (*(int *)data) ++++ +++ smmu_domain->stage = ARM_SMMU_DOMAIN_NESTED; ++++ +++ else ++++ +++ smmu_domain->stage = ARM_SMMU_DOMAIN_S1; ++++ +++ ++++ +++ return 0; ++++ +++ default: ++++ +++ return -ENODEV; ++++ +++ } ++++ +++} ++++ +++ static const struct iommu_ops arm_smmu_ops = { ---- --- .capable = arm_smmu_capable, ---- --- .domain_init = arm_smmu_domain_init, ---- --- .domain_destroy = arm_smmu_domain_destroy, ---- --- .attach_dev = arm_smmu_attach_dev, ---- --- .detach_dev = arm_smmu_detach_dev, ---- --- .map = arm_smmu_map, ---- --- .unmap = arm_smmu_unmap, - .map_sg = default_iommu_map_sg, ---- --- .iova_to_phys = arm_smmu_iova_to_phys, ---- --- .add_device = arm_smmu_add_device, ---- --- .remove_device = arm_smmu_remove_device, ---- --- .pgsize_bitmap = (SECTION_SIZE | ---- --- ARM_SMMU_PTE_CONT_SIZE | ---- --- PAGE_SIZE), ++++ +++ .capable = arm_smmu_capable, ++++ +++ .domain_init = arm_smmu_domain_init, ++++ +++ .domain_destroy = arm_smmu_domain_destroy, ++++ +++ .attach_dev = arm_smmu_attach_dev, ++++ +++ .detach_dev = arm_smmu_detach_dev, ++++ +++ .map = arm_smmu_map, ++++ +++ .unmap = arm_smmu_unmap, ++++++++ .map_sg = default_iommu_map_sg, ++++ +++ .iova_to_phys = arm_smmu_iova_to_phys, ++++ +++ .add_device = arm_smmu_add_device, ++++ +++ .remove_device = arm_smmu_remove_device, ++++ +++ .domain_get_attr = arm_smmu_domain_get_attr, ++++ +++ .domain_set_attr = arm_smmu_domain_set_attr, ++++ +++ .pgsize_bitmap = (SECTION_SIZE | ++++ +++ ARM_SMMU_PTE_CONT_SIZE | ++++ +++ PAGE_SIZE), }; static void arm_smmu_device_reset(struct arm_smmu_device *smmu)