summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/page.h
diff options
context:
space:
mode:
authorJeremy Linton <jeremy.linton@arm.com>2015-10-07 19:00:19 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2015-10-08 19:39:03 +0200
commit2ff4439bb45a05433282d4fa9ca84202147819c7 (patch)
tree966b90ceced9ac47c05282f1ec2b606a3f65a150 /arch/arm64/include/asm/page.h
parentMAINTAINERS: add myself as arm perf reviewer (diff)
downloadlinux-2ff4439bb45a05433282d4fa9ca84202147819c7.tar.xz
linux-2ff4439bb45a05433282d4fa9ca84202147819c7.zip
arm64: Add contiguous page flag shifts and constants
Add the number of pages required to form a contiguous range, as well as some supporting constants. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/page.h')
-rw-r--r--arch/arm64/include/asm/page.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/page.h b/arch/arm64/include/asm/page.h
index 7d9c7e4a424b..33892ef0172d 100644
--- a/arch/arm64/include/asm/page.h
+++ b/arch/arm64/include/asm/page.h
@@ -20,14 +20,20 @@
#define __ASM_PAGE_H
/* PAGE_SHIFT determines the page size */
+/* CONT_SHIFT determines the number of pages which can be tracked together */
#ifdef CONFIG_ARM64_64K_PAGES
#define PAGE_SHIFT 16
+#define CONT_SHIFT 5
#else
#define PAGE_SHIFT 12
+#define CONT_SHIFT 4
#endif
-#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
+#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
+#define CONT_SIZE (_AC(1, UL) << (CONT_SHIFT + PAGE_SHIFT))
+#define CONT_MASK (~(CONT_SIZE-1))
+
/*
* The idmap and swapper page tables need some space reserved in the kernel
* image. Both require pgd, pud (4 levels only) and pmd tables to (section)