Skip to contentSkip to conversation

iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag

PATCH Applied Will Deacon 4 participants 7 messages Jul 3, 2020 – Jul 10, 2020

Subsystems (2)
lore
Share & tools
lore

Will Deacon

author maintainer
#0 lore raw

PATCH 1/1 iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag

The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and has no in-tree users. Remove it.

Cc Robin Murphy <[email protected]>
Cc "Isaac J. Manjarres" <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Sai Prakash Ranjan <[email protected]>
Cc Rob Clark <[email protected]>

---

As discussed in [1], sounds like this should be a domain attribute anyway when it's needed by the GPU.

[1] https://lore.kernel.org/r/CAF6AEGsCROVTsi2R7_aUkmH9Luoc_guMR0w0KUJc2cEgpfj79w@mail.gmail.com

 drivers/iommu/io-pgtable-arm.c | 3 ---
 include/linux/iommu.h          | 6 ------
 2 files changed, 9 deletions(-)
drivers/iommu/io-pgtable-arm.c +0 -3
index 04fbd4bf0ff9..8f175c02f8e3 100644
@@ -438,9 +438,6 @@ 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_SYS_CACHE_ONLY)
-			pte |= (ARM_LPAE_MAIR_ATTR_IDX_INC_OCACHE
-				<< ARM_LPAE_PTE_ATTRINDX_SHIFT);
 	}
 
 	if (prot & IOMMU_CACHE)
include/linux/iommu.h +0 -6
index 5f0b7859d2eb..bee1a8fa1fb1 100644
@@ -31,12 +31,6 @@
  * if the IOMMU page table format is equivalent.
  */
 #define IOMMU_PRIV	(1 << 5)
-/*
- * 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_SYS_CACHE_ONLY	(1 << 6)
 
 struct iommu_ops;
 struct iommu_group;
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Will Deacon

The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and has no in-tree users. Remove it.

Cc Robin Murphy <[email protected]>
Cc "Isaac J. Manjarres" <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Sai Prakash Ranjan <[email protected]>
Cc Rob Clark <[email protected]>
Quoted 8 lines

---

As discussed in [1], sounds like this should be a domain attribute anyway when it's needed by the GPU.

[1]
https://lore.kernel.org/r/CAF6AEGsCROVTsi2R7_aUkmH9Luoc_guMR0w0KUJc2cEgpfj79w@mail.gmail.com

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
maintainer Applied
#3 lore raw
In reply to Will Deacon
Quoted 12 lines · Will Deacon

The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and has no in-tree users. Remove it.

Cc Robin Murphy <[email protected]>
Cc "Isaac J. Manjarres" <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Sai Prakash Ranjan <[email protected]>
Cc Rob Clark <[email protected]>

---

Quoted 8 lines

As discussed in [1], sounds like this should be a domain attribute anyway when it's needed by the GPU.

[1] https://lore.kernel.org/r/CAF6AEGsCROVTsi2R7_aUkmH9Luoc_guMR0w0KUJc2cEgpfj79w@mail.gmail.com

 drivers/iommu/io-pgtable-arm.c | 3 ---
 include/linux/iommu.h          | 6 ------
 2 files changed, 9 deletions(-)

Applied, thanks.

author maintainer
#4 lore raw

Hi Joerg,

Quoted 16 lines · Joerg Roedel
Quoted 15 lines · Will Deacon

The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and has no in-tree users. Remove it.

Cc Robin Murphy <[email protected]>
Cc "Isaac J. Manjarres" <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Sai Prakash Ranjan <[email protected]>
Cc Rob Clark <[email protected]>

---

As discussed in [1], sounds like this should be a domain attribute anyway when it's needed by the GPU.

Quoted 7 lines
Quoted 5 lines

[1] https://lore.kernel.org/r/CAF6AEGsCROVTsi2R7_aUkmH9Luoc_guMR0w0KUJc2cEgpfj79w@mail.gmail.com

 drivers/iommu/io-pgtable-arm.c | 3 ---
 include/linux/iommu.h          | 6 ------
 2 files changed, 9 deletions(-)

Applied, thanks.

Ah, I'd already got this queued for 5.9:

https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/updates

and I've queued a small number of patches on top of it now.

Are you planning to send it for 5.8? If so, I suspect I'll have to rebase.

Will

author maintainer
#6 lore raw
Quoted 11 lines · Joerg Roedel
Quoted 7 lines · Will Deacon

Ah, I'd already got this queued for 5.9:

https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/updates

and I've queued a small number of patches on top of it now.

Are you planning to send it for 5.8? If so, I suspect I'll have to rebase.

No problem, nothing got pushed yet. I removed it from my branch and wait for your pull-request.

Great, thanks Joerg.

Will
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu