Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e143b90 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull IOMMU updates from Joerg Roedel:

 - Page table code for AMD IOMMU now supports large pages where smaller
   page-sizes were mapped before. VFIO had to work around that in the
   past and I included a patch to remove it (acked by Alex Williamson)

 - Patches to unmodularize a couple of IOMMU drivers that would never
   work as modules anyway.

 - Work to unify the the iommu-related pointers in 'struct device' into
   one pointer. This work is not finished yet, but will probably be in
   the next cycle.

 - NUMA aware allocation in iommu-dma code

 - Support for r8a774a1 and r8a774c0 in the Renesas IOMMU driver

 - Scalable mode support for the Intel VT-d driver

 - PM runtime improvements for the ARM-SMMU driver

 - Support for the QCOM-SMMUv2 IOMMU hardware from Qualcom

 - Various smaller fixes and improvements

* tag 'iommu-updates-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (78 commits)
  iommu: Check for iommu_ops == NULL in iommu_probe_device()
  ACPI/IORT: Don't call iommu_ops->add_device directly
  iommu/of: Don't call iommu_ops->add_device directly
  iommu: Consolitate ->add/remove_device() calls
  iommu/sysfs: Rename iommu_release_device()
  dmaengine: sh: rcar-dmac: Use device_iommu_mapped()
  xhci: Use device_iommu_mapped()
  powerpc/iommu: Use device_iommu_mapped()
  ACPI/IORT: Use device_iommu_mapped()
  iommu/of: Use device_iommu_mapped()
  driver core: Introduce device_iommu_mapped() function
  iommu/tegra: Use helper functions to access dev->iommu_fwspec
  iommu/qcom: Use helper functions to access dev->iommu_fwspec
  iommu/of: Use helper functions to access dev->iommu_fwspec
  iommu/mediatek: Use helper functions to access dev->iommu_fwspec
  iommu/ipmmu-vmsa: Use helper functions to access dev->iommu_fwspec
  iommu/dma: Use helper functions to access dev->iommu_fwspec
  iommu/arm-smmu: Use helper functions to access dev->iommu_fwspec
  ACPI/IORT: Use helper functions to access dev->iommu_fwspec
  iommu: Introduce wrappers around dev->iommu_fwspec
  ...
parents 78e8696c 03ebe48e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1690,12 +1690,12 @@
			By default, super page will be supported if Intel IOMMU
			has the capability. With this option, super page will
			not be supported.
		ecs_off [Default Off]
			By default, extended context tables will be supported if
			the hardware advertises that it has support both for the
			extended tables themselves, and also PASID support. With
			this option set, extended tables will not be used even
			on hardware which claims to support them.
		sm_off [Default Off]
			By default, scalable mode will be supported if the
			hardware advertises that it has support for the scalable
			mode translation. With this option set, scalable mode
			will not be used even on hardware which claims to support
			it.
		tboot_noforce [Default Off]
			Do not force the Intel IOMMU enabled under tboot.
			By default, tboot will force Intel IOMMU on, which
+43 −0
Original line number Diff line number Diff line
@@ -17,10 +17,20 @@ conditions.
                        "arm,mmu-401"
                        "arm,mmu-500"
                        "cavium,smmu-v2"
                        "qcom,smmu-v2"

                  depending on the particular implementation and/or the
                  version of the architecture implemented.

                  Qcom SoCs must contain, as below, SoC-specific compatibles
                  along with "qcom,smmu-v2":
                  "qcom,msm8996-smmu-v2", "qcom,smmu-v2",
                  "qcom,sdm845-smmu-v2", "qcom,smmu-v2".

                  Qcom SoCs implementing "arm,mmu-500" must also include,
                  as below, SoC-specific compatibles:
                  "qcom,sdm845-smmu-500", "arm,mmu-500"

- reg           : Base address and size of the SMMU.

- #global-interrupts : The number of global interrupts exposed by the
@@ -71,6 +81,22 @@ conditions.
                  or using stream matching with #iommu-cells = <2>, and
                  may be ignored if present in such cases.

- clock-names:    List of the names of clocks input to the device. The
                  required list depends on particular implementation and
                  is as follows:
                  - for "qcom,smmu-v2":
                    - "bus": clock required for downstream bus access and
                             for the smmu ptw,
                    - "iface": clock required to access smmu's registers
                               through the TCU's programming interface.
                  - unspecified for other implementations.

- clocks:         Specifiers for all clocks listed in the clock-names property,
                  as per generic clock bindings.

- power-domains:  Specifiers for power domains required to be powered on for
                  the SMMU to operate, as per generic power domain bindings.

** Deprecated properties:

- mmu-masters (deprecated in favour of the generic "iommus" binding) :
@@ -137,3 +163,20 @@ conditions.
                iommu-map = <0 &smmu3 0 0x400>;
                ...
        };

	/* Qcom's arm,smmu-v2 implementation */
	smmu4: iommu@d00000 {
		compatible = "qcom,msm8996-smmu-v2", "qcom,smmu-v2";
		reg = <0xd00000 0x10000>;

		#global-interrupts = <1>;
		interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>;
		#iommu-cells = <1>;
		power-domains = <&mmcc MDSS_GDSC>;

		clocks = <&mmcc SMMU_MDP_AXI_CLK>,
			 <&mmcc SMMU_MDP_AHB_CLK>;
		clock-names = "bus", "iface";
	};
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ Required Properties:
    - "renesas,ipmmu-r8a7743" for the R8A7743 (RZ/G1M) IPMMU.
    - "renesas,ipmmu-r8a7744" for the R8A7744 (RZ/G1N) IPMMU.
    - "renesas,ipmmu-r8a7745" for the R8A7745 (RZ/G1E) IPMMU.
    - "renesas,ipmmu-r8a774a1" for the R8A774A1 (RZ/G2M) IPMMU.
    - "renesas,ipmmu-r8a774c0" for the R8A774C0 (RZ/G2E) IPMMU.
    - "renesas,ipmmu-r8a7790" for the R8A7790 (R-Car H2) IPMMU.
    - "renesas,ipmmu-r8a7791" for the R8A7791 (R-Car M2-W) IPMMU.
    - "renesas,ipmmu-r8a7793" for the R8A7793 (R-Car M2-N) IPMMU.
+1 −1
Original line number Diff line number Diff line
@@ -1472,7 +1472,7 @@ static int dev_has_iommu_table(struct device *dev, void *data)
	if (!dev)
		return 0;

	if (dev->iommu_group) {
	if (device_iommu_mapped(dev)) {
		*ppdev = pdev;
		return 1;
	}
+2 −2
Original line number Diff line number Diff line
@@ -1088,7 +1088,7 @@ int iommu_add_device(struct iommu_table_group *table_group, struct device *dev)
	if (!device_is_registered(dev))
		return -ENOENT;

	if (dev->iommu_group) {
	if (device_iommu_mapped(dev)) {
		pr_debug("%s: Skipping device %s with iommu group %d\n",
			 __func__, dev_name(dev),
			 iommu_group_id(dev->iommu_group));
@@ -1109,7 +1109,7 @@ void iommu_del_device(struct device *dev)
	 * and we needn't detach them from the associated
	 * IOMMU groups
	 */
	if (!dev->iommu_group) {
	if (!device_iommu_mapped(dev)) {
		pr_debug("iommu_tce: skipping device %s with no tbl\n",
			 dev_name(dev));
		return;
Loading