diff options
author | Gary King <GKing@nvidia.com> | 2010-01-29 17:44:49 -0800 |
---|---|---|
committer | Gary King <GKing@nvidia.com> | 2010-02-02 10:15:16 -0800 |
commit | 4a66a93c8ef34219e5a8837055c6aef70b534f3d (patch) | |
tree | 52abdf55cdf930fb27cf6990d1b0b7f72a637432 /arch/arm/include/asm | |
parent | 285720ec7f1e9023423f899e5d17557f892bc492 (diff) |
[ARM]: add memory type for inner-WBWA, outer-non cacheable mapping
For streaming-style operations (e.g., software rendering of graphics
surfaces shared with non-coherent DMA devices), the cost of performing
L2 cache maintenance can exceed the benefit of having the larger cache
(this is particularly true for OUTER_CACHE configurations like the ARM
PL2x0).
This change uses the currently-unused mapping 5 (TEX[0]=1, C=0, B=1)
in the ARMv7 TRE table as an inner-writeback-write-allocate, outer
non-cacheable memory type, so that this mapping will be available to
clients which will benefit from the reduced L2 maintenance.
Change-Id: Ifd88f6df3e98ff3f8fbe95283891b9a9b1070c6b
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 110295c5461d..c96214f64e50 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -186,6 +186,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val); #define L_PTE_MT_DEV_NONSHARED (0x0c << 2) /* 1100 */ #define L_PTE_MT_DEV_WC (0x09 << 2) /* 1001 */ #define L_PTE_MT_DEV_CACHED (0x0b << 2) /* 1011 */ +#define L_PTE_MT_INNER_WB (0x05 << 2) /* 0101 (armv6, armv7) */ #define L_PTE_MT_MASK (0x0f << 2) #ifndef __ASSEMBLY__ @@ -313,6 +314,8 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; } __pgprot((pgprot_val(prot) & ~L_PTE_MT_MASK) | L_PTE_MT_UNCACHED) #define pgprot_writecombine(prot) \ __pgprot((pgprot_val(prot) & ~L_PTE_MT_MASK) | L_PTE_MT_BUFFERABLE) +#define pgprot_inner_writeback(prot) \ + __pgprot((pgprot_val(prot) & ~L_PTE_MT_MASK) | L_PTE_MT_INNER_WB) #define pmd_none(pmd) (!pmd_val(pmd)) #define pmd_present(pmd) (pmd_val(pmd)) |