History

iommu/io-pgtable-arm: Add support to use system cache

Few Qualcomm platforms such as, sdm845 have an additional outer cache called as System cache, aka. Last level cache (LLC) that allows non-coherent devices to upgrade to using caching. This cache sits right before the DDR, and is tightly coupled with the memory controller. The clients using this cache request their slices from this system cache, make it active, and can then start using it. There is a fundamental assumption that non-coherent devices can't access caches. This change adds an exception where they *can* use some level of cache despite still being non-coherent overall. The coherent devices that use cacheable memory, and CPU make use of this system cache by default. Looking at memory types, we have following - a) Normal uncached :- MAIR 0x44, inner non-cacheable, outer non-cacheable; b) Normal cached :- MAIR 0xff, inner read write-back non-transient, outer read write-back non-transient; attribute setting for coherenet I/O devices. and, for non-coherent i/o devices that can allocate in system cache another type gets added - c) Normal sys-cached :- MAIR 0xf4, inner non-cacheable, outer read write-back non-transient Coherent I/O devices use system cache by marking the memory as normal cached. Non-coherent I/O devices should mark the memory as normal sys-cached in page tables to use system cache.

Vivek Gautam committed 7 years ago

Commit 90ec7a71 parent d25f6ea2 files · +14 −1Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/iommu.h+6−0
@@ -41,6 +41,12 @@ · 40 unmodified lines
4141 * if the IOMMU page table format is equivalent.
4242 */
4343 #define IOMMU_PRIV (1 << 5)
44+/*
45+ * Non-coherent masters on few Qualcomm SoCs can use this page protection flag
46+ * to set correct cacheability attributes to use an outer level of cache -
47+ * last level cache, aka system cache.
48+ */
49+#define IOMMU_QCOM_SYS_CACHE (1 << 6)
4450
4551 struct iommu_ops;
4652 struct iommu_group;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t