[PATCH 2/2] ARM: kconfig: select HAVE_EFFICIENT_UNALIGNED_ACCESS for CPUv6+ && MMU

Nicolas Pitre nicolas.pitre at linaro.org
Tue Dec 17 15:34:18 EST 2013


On Tue, 17 Dec 2013, Will Deacon wrote:

> Modern ARM CPUs can perform efficient unaligned memory accesses in
> hardware and this feature is relied up on by code such as the dcache
> word-at-a-time name hashing.
> 
> This patch selects HAVE_EFFICIENT_UNALIGNED_ACCESS for these cores and
> reworks the kconfig select logic for DCACHE_WORD_ACCESS to use the new
> symbol.
> 
> Signed-off-by: Will Deacon <will.deacon at arm.com>

This symbol could be used in some more places too.  For example this 
would make the code a bit clearer:

diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 72abdc541f..12c3a5decc 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -19,7 +19,7 @@
 #include <asm/unified.h>
 #include <asm/compiler.h>
 
-#if __LINUX_ARM_ARCH__ < 6
+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 #include <asm-generic/uaccess-unaligned.h>
 #else
 #define __get_user_unaligned __get_user


Nicolas



More information about the linux-arm-kernel mailing list