git: abc7a4a0c1b0 - main - Simplify setting a non-4k PAGE_SIZE on arm64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 10 Aug 2022 16:06:26 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=abc7a4a0c1b0ecfd44fd7e0a9d47d6cd4eed1362 commit abc7a4a0c1b0ecfd44fd7e0a9d47d6cd4eed1362 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-08-09 15:15:56 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-08-10 16:02:00 +0000 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 --- sys/arm64/include/param.h | 7 ++----- 1 file 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 */