git: c1ae7841d4e7 - main - arm64: Simplify initialization of pc_freemask.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Oct 2022 23:21:18 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c1ae7841d4e73f8627bb76b1dc7e094691cc7a54 commit c1ae7841d4e73f8627bb76b1dc7e094691cc7a54 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-10-05 23:20:55 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-10-05 23:20:55 +0000 arm64: Simplify initialization of pc_freemask. Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D36502 --- sys/arm64/arm64/pmap.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 148e325c84ba..1e9ada8c89f7 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2515,16 +2515,11 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREEN 0xfffffffffffffffful #define PC_FREEL ((1ul << (_NPCPV % 64)) - 1) -static const uint64_t pc_freemask[] = { PC_FREEN, PC_FREEN, -#if _NPCM > 3 - PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, - PC_FREEN, -#endif - PC_FREEL +static const uint64_t pc_freemask[_NPCM] = { + [0 ... _NPCM - 2] = PC_FREEN, + [_NPCM - 1] = PC_FREEL }; -CTASSERT(nitems(pc_freemask) == _NPCM); - static __inline bool pc_is_full(struct pv_chunk *pc) {