From 3413a8cd819b584d44d8dfb886795060b7f95b0a Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 23 Dec 2020 09:46:13 +0000 Subject: [PATCH] Rename the arm64 4k PAGE_* macros These now have a _4K suffix to allow us to be explicit when we mean to use a 4k page rather than assuming PAGE_SIZE is 4k. Sponsored by: Innovate UK --- sys/arm64/include/param.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h index f9d09eb49ed4..a01b37da84c5 100644 --- a/sys/arm64/include/param.h +++ b/sys/arm64/include/param.h @@ -83,9 +83,9 @@ #define CACHE_LINE_SHIFT 7 #define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) -#define PAGE_SHIFT 12 -#define PAGE_SIZE (1 << PAGE_SHIFT) /* Page size */ -#define PAGE_MASK (PAGE_SIZE - 1) +#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) @@ -95,6 +95,10 @@ #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 MAXPAGESIZES 3 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES