diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-15 06:02:43 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-17 06:52:11 -0400 |
commit | 47ab0dee661dbd5aca67abe44a333e471134fbf9 (patch) | |
tree | 6464acf6eb3cd42102fa70e160335626354edfc1 /arch/arm/mm/Kconfig | |
parent | 8c0b742ca7a7d21de0ddc87eda6ef0b282e4de18 (diff) |
ARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA
Provide a configuration option to allow the ARMv6 to use normal
bufferable memory for coherent DMA. This option is forced to 'y'
for ARMv7, and offered as a configuration option on ARMv6.
Enabling this option requires drivers to have the necessary barriers
to ensure that data in DMA coherent memory is visible prior to the
DMA operation commencing.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/Kconfig')
-rw-r--r-- | arch/arm/mm/Kconfig | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index c4ed9f93f646..573528d9c6d8 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -781,3 +781,22 @@ config ARM_L1_CACHE_SHIFT | |||
781 | int | 781 | int |
782 | default 6 if ARM_L1_CACHE_SHIFT_6 | 782 | default 6 if ARM_L1_CACHE_SHIFT_6 |
783 | default 5 | 783 | default 5 |
784 | |||
785 | config ARM_DMA_MEM_BUFFERABLE | ||
786 | bool "Use non-cacheable memory for DMA" if CPU_V6 && !CPU_V7 | ||
787 | default y if CPU_V6 || CPU_V7 | ||
788 | help | ||
789 | Historically, the kernel has used strongly ordered mappings to | ||
790 | provide DMA coherent memory. With the advent of ARMv7, mapping | ||
791 | memory with differing types results in unpredictable behaviour, | ||
792 | so on these CPUs, this option is forced on. | ||
793 | |||
794 | Multiple mappings with differing attributes is also unpredictable | ||
795 | on ARMv6 CPUs, but since they do not have aggressive speculative | ||
796 | prefetch, no harm appears to occur. | ||
797 | |||
798 | However, drivers may be missing the necessary barriers for ARMv6, | ||
799 | and therefore turning this on may result in unpredictable driver | ||
800 | behaviour. Therefore, we offer this as an option. | ||
801 | |||
802 | You are recommended say 'Y' here and debug any affected drivers. | ||