aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2022-08-09 15:15:56 +0000
committerAndrew Turner <andrew@FreeBSD.org>2022-08-10 16:02:00 +0000
commitabc7a4a0c1b0ecfd44fd7e0a9d47d6cd4eed1362 (patch)
tree5af254d8c4ef4404750fc89724234398ed5f514f
parent7dc4d5118c0268efe48c0e36c49cba1e2a8e39fc (diff)
downloadsrc-main.tar.gz
src-main.zip
Simplify setting a non-4k PAGE_SIZE on arm64HEADmain
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
-rw-r--r--sys/arm64/include/param.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h
index f331fd19e2c8..8b2ac8c9bd18 100644
--- a/sys/arm64/include/param.h
+++ b/sys/arm64/include/param.h
@@ -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 */