[PATCH] ARM: use default ioremap alignment for SMP or LPAE

Sergey Dyasly s.dyasly at samsung.com
Wed Jan 21 23:17:55 PST 2015

16MB alignment for ioremap mappings was added by commit a069c896d0d6 ("[ARM]
3705/1: add supersection support to ioremap()") in order to support supersection
mappings. But __arm_ioremap_pfn_caller uses section and supersection mappings
only in !SMP && !LPAE case. There is no need for such big alignment if either
SMP or LPAE is enabled.

After this change, ioremap will use default maximum alignment of 128 pages.

Cc: Russell King <linux at arm.linux.org.uk>
Cc: Guan Xuetao <gxt at mprc.pku.edu.cn>
Cc: Nicolas Pitre <nicolas.pitre at linaro.org>
Cc: James Bottomley <JBottomley at parallels.com>
Cc: Will Deacon <will.deacon at arm.com>
Cc: Arnd Bergmann <arnd.bergmann at linaro.org>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Dmitry Safonov <d.safonov at partner.samsung.com>
Link: https://lkml.kernel.org/g/1419328813-2211-1-git-send-email-d.safonov@partner.samsung.com
Signed-off-by: Sergey Dyasly <s.dyasly at samsung.com>
 arch/arm/include/asm/memory.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 184def0..c3ef139 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -78,10 +78,12 @@
 #define XIP_VIRT_ADDR(physaddr)  (MODULES_VADDR + ((physaddr) & 0x000fffff))
+#if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
  * Allow 16MB-aligned ioremap pages
 #else /* CONFIG_MMU */

More information about the linux-arm-kernel mailing list