]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iommu/io-pgtable-arm: Rename IOMMU_QCOM_SYS_CACHE and improve doc
authorWill Deacon <will@kernel.org>
Thu, 24 Oct 2019 15:57:39 +0000 (16:57 +0100)
committerWill Deacon <will@kernel.org>
Thu, 7 Nov 2019 12:19:05 +0000 (12:19 +0000)
The 'IOMMU_QCOM_SYS_CACHE' IOMMU protection flag is exposed to all
users of the IOMMU API. Despite its name, the idea behind it isn't
especially tied to Qualcomm implementations and could conceivably be
used by other systems.

Rename it to 'IOMMU_SYS_CACHE_ONLY' and update the comment to describe
a bit better the idea behind it.

Cc: Robin Murphy <robin.murphy@arm.com>
Cc: "Isaac J. Manjarres" <isaacm@codeaurora.org>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/io-pgtable-arm.c
include/linux/iommu.h

index cd96442af44be26a53d914695b5910f3df970fbd..bdf47f74526879d1316f640e2308a0a3871931f1 100644 (file)
@@ -455,7 +455,7 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,
                else if (prot & IOMMU_CACHE)
                        pte |= (ARM_LPAE_MAIR_ATTR_IDX_CACHE
                                << ARM_LPAE_PTE_ATTRINDX_SHIFT);
-               else if (prot & IOMMU_QCOM_SYS_CACHE)
+               else if (prot & IOMMU_SYS_CACHE_ONLY)
                        pte |= (ARM_LPAE_MAIR_ATTR_IDX_INC_OCACHE
                                << ARM_LPAE_PTE_ATTRINDX_SHIFT);
        }
index 29bac5345563aca434bfb86ab00df539ab80d080..a86bd21d08a9b17878c37daf1753f65cb1c606a6 100644 (file)
  */
 #define IOMMU_PRIV     (1 << 5)
 /*
- * Non-coherent masters on few Qualcomm SoCs can use this page protection flag
- * to set correct cacheability attributes to use an outer level of cache -
- * last level cache, aka system cache.
+ * Non-coherent masters can use this page protection flag to set cacheable
+ * memory attributes for only a transparent outer level of cache, also known as
+ * the last-level or system cache.
  */
-#define IOMMU_QCOM_SYS_CACHE   (1 << 6)
+#define IOMMU_SYS_CACHE_ONLY   (1 << 6)
 
 struct iommu_ops;
 struct iommu_group;