Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191752
b: refs/heads/master
c: 47ab0de
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed May 17, 2010
1 parent 040f1e2 commit 905ecbf
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c0b742ca7a7d21de0ddc87eda6ef0b282e4de18
refs/heads/master: 47ab0dee661dbd5aca67abe44a333e471134fbf9
2 changes: 1 addition & 1 deletion trunk/arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED)
#define pgprot_writecombine(prot) \
__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE)
#if __LINUX_ARM_ARCH__ >= 7
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
#define pgprot_dmacoherent(prot) \
__pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_BUFFERABLE)
#else
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ extern unsigned int user_debug;
#define dmb() __asm__ __volatile__ ("" : : : "memory")
#endif

#if __LINUX_ARM_ARCH__ >= 7 || defined(CONFIG_SMP)
#if defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP)
#define mb() dmb()
#define rmb() dmb()
#define wmb() dmb()
Expand Down
19 changes: 19 additions & 0 deletions trunk/arch/arm/mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -781,3 +781,22 @@ config ARM_L1_CACHE_SHIFT
int
default 6 if ARM_L1_CACHE_SHIFT_6
default 5

config ARM_DMA_MEM_BUFFERABLE
bool "Use non-cacheable memory for DMA" if CPU_V6 && !CPU_V7
default y if CPU_V6 || CPU_V7
help
Historically, the kernel has used strongly ordered mappings to
provide DMA coherent memory. With the advent of ARMv7, mapping
memory with differing types results in unpredictable behaviour,
so on these CPUs, this option is forced on.

Multiple mappings with differing attributes is also unpredictable
on ARMv6 CPUs, but since they do not have aggressive speculative
prefetch, no harm appears to occur.

However, drivers may be missing the necessary barriers for ARMv6,
and therefore turning this on may result in unpredictable driver
behaviour. Therefore, we offer this as an option.

You are recommended say 'Y' here and debug any affected drivers.

0 comments on commit 905ecbf

Please sign in to comment.