Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15278803 authored by Jeremy Linton's avatar Jeremy Linton Committed by Sami Tolvanen
Browse files

UPSTREAM: 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: default avatarJeremy Linton <jeremy.linton@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>

Bug: 31432001
Change-Id: I033ce1485f3c57295ddddf15838f3bb28d8d5838
(cherry picked from commit 2ff4439bb45a05433282d4fa9ca84202147819c7)
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent a6672be9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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_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)