]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm64: Add contiguous page flag shifts and constants
authorJeremy Linton <jeremy.linton@arm.com>
Wed, 7 Oct 2015 17:00:19 +0000 (12:00 -0500)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 8 Oct 2015 17:39:03 +0000 (18:39 +0100)
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>
arch/arm64/include/asm/page.h

index 7d9c7e4a424bddd87dfdbd34e2be0d05b2078f58..33892ef0172dc1d328b8fa8528354dd140c8c80b 100644 (file)
 #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)