aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/page.h
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-01-14 11:18:07 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-14 11:18:07 -0500
commitda2b1cd61903c8e9796e76be2d606584f26a78e5 (patch)
tree75dbc2f10d349a7308e5dccaef85274b2f495c93 /include/asm-arm/page.h
parentfa0fe48fcca9ea7f8c13e21d2646bbaa1747d183 (diff)
[ARM] 3101/1: ARM EABI: slab memory must be 64-bit aligned
Patch from Nicolas Pitre Although ARM is still using 32-bit pointers, version 5 and later versions of the ARM architecture introduced the ldrd and strd instructions to move 64-bit data which must be 64-bit aligned in memory, and the EABI includes new constraints on structure data alignment to allow for the compiler to use those instructions. This means that any slab allocation must start on a 64-bit boundary which is not equivalent to BYTES_PER_WORD, especially on those architecture versions that implements the ldrd/strd instructions. Overriding the default alignment disables some slab debug features. If those debug features are really needed then the kernel will have to be compiled for version 4 of the ARM architecture. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/page.h')
-rw-r--r--include/asm-arm/page.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 4da1d532cbeb..416320d95419 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -170,6 +170,13 @@ extern pmd_t *top_pmd;
170#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 170#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
171 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 171 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
172 172
173/*
174 * With EABI on ARMv5 and above we must have 64-bit aligned slab pointers.
175 */
176#if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5)
177#define ARCH_SLAB_MINALIGN 8
178#endif
179
173#endif /* __KERNEL__ */ 180#endif /* __KERNEL__ */
174 181
175#include <asm-generic/page.h> 182#include <asm-generic/page.h>