Simplify setting a non-4k PAGE_SIZE on arm64

Define PAGE_SIZE and PAGE_MASK based on PAGE_SHIFT. With this we only
need to set one value to change one value to change the page size.

While here remove the unused PAGE_MASK_* macros.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Andrew Turner 2022-08-09 16:15:56 +01:00
parent 7dc4d5118c
commit abc7a4a0c1

View File

@ -85,19 +85,16 @@
#define PAGE_SHIFT_4K 12
#define PAGE_SIZE_4K (1 << PAGE_SHIFT_4K)
#define PAGE_MASK_4K (PAGE_SIZE_4K - 1)
#define PAGE_SHIFT_16K 14
#define PAGE_SIZE_16K (1 << PAGE_SHIFT_16K)
#define PAGE_MASK_16K (PAGE_SIZE_16K - 1)
#define PAGE_SHIFT_64K 16
#define PAGE_SIZE_64K (1 << PAGE_SHIFT_64K)
#define PAGE_MASK_64K (PAGE_SIZE_64K - 1)
#define PAGE_SHIFT PAGE_SHIFT_4K
#define PAGE_SIZE PAGE_SIZE_4K
#define PAGE_MASK PAGE_MASK_4K
#define PAGE_SIZE (1 << PAGE_SHIFT)
#define PAGE_MASK (PAGE_SIZE - 1)
#define MAXPAGESIZES 3 /* maximum number of supported page sizes */