summaryrefslogtreecommitdiff
path: root/arch/arm/mm/Kconfig
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-08-02 15:55:16 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:36:01 -0800
commit87e7e9b170105c5d311f86a45223cc36bd24f3bb (patch)
treee57f62a1922b88c62828b5c9be5e59615a3f0630 /arch/arm/mm/Kconfig
parenta03bc0f71c14b962b27ef64c3420e29ab42ac99d (diff)
[ARM] mm: add page allocator for modifying cache attributes
ARM CPUs with speculative prefetching have undefined behaviors when the same physical page is mapped to two different virtual addresses with conflicting cache attributes. since many recent systems include IOMMU functionality (i.e., remapping of discontiguous physical pages into a virtually-contiguous address range for I/O devices), it is desirable to support allocating any available OS memory for use by the I/O devices. however, since many systems do not support cache coherency between the CPU and DMA devices, these devices are left with using DMA-coherent allocations from the OS (which severely limits the benefit of an IOMMU) or performing cache maintenance (which can be a severe performance loss, particularly on systems with outer caches, compared to using DMA-coherent memory). this change adds an API for allocating pages from the OS with specific cache maintenance properties and ensures that the kernel's mapping of the page reflects the desired cache attributes, in line with the ARMv7 architectural requirements Change-Id: If0bd3cfe339b9a9b10fd6d45a748cd5e65931cf0 Signed-off-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/mm/Kconfig')
-rw-r--r--arch/arm/mm/Kconfig23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 88633fe01a5d..122d88e073d6 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -864,6 +864,29 @@ config ARM_L1_CACHE_SHIFT
default 6 if ARM_L1_CACHE_SHIFT_6
default 5
+config ARM_ATTRIB_ALLOCATOR
+ bool "Support custom cache attribute allocations in low memory"
+ select ARCH_LOWMEM_IN_PTES if (CPU_V7)
+ depends on MMU && !CPU_CACHE_VIVT
+ help
+ Historically, the kernel has only reserved a small region
+ of physical memory for uncached access, and relied on
+ explicit cache maintenance for ensuring coherency between
+ the CPU and DMA.
+
+ However, many recent systems support mapping discontiguous
+ physical pages into contiguous DMA addresses (so-called
+ system MMUs). For some DMA clients (notably graphics and
+ multimedia engines), performing explict cache maintenance
+ between CPU and DMA mappings can be prohibitively expensive,
+ and since ARMv7, mapping the same physical page with different
+ cache attributes is disallowed and has unpredictable behavior.
+
+ Say 'Y' here to include page allocation support with explicit
+ cache attributes; on ARMv7 systems this will also force the
+ kernel's page tables to be mapped using page tables rather
+ than sections.
+
config ARM_DMA_MEM_BUFFERABLE
bool "Use non-cacheable memory for DMA" if (CPU_V6 || CPU_V6K) && !CPU_V7
depends on !(MACH_REALVIEW_PB1176 || REALVIEW_EB_ARM11MP || \