Skip to content

Commit

Permalink
arm64: Refine comment about size of struct pmap_large_md_page
Browse files Browse the repository at this point in the history
pmap_init_pv_table does not assume a specific size of 64.  It does
assume a size that evenly divides the size of a page since it inserts
pages from different domains into the kva backing the global pv_table
array.

Reviewed by:	imp, markj
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D48455
  • Loading branch information
bsdjhb committed Jan 15, 2025
1 parent 5c341fe commit 101e825
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sys/arm64/arm64/pmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,11 +1547,11 @@ pmap_init_pv_table(void)
int domain, i, j, pages;

/*
* We strongly depend on the size being a power of two, so the assert
* is overzealous. However, should the struct be resized to a
* different power of two, the code below needs to be revisited.
* We depend on the size being evenly divisible into a page so
* that the pv_table array can be indexed directly while
* safely spanning multiple pages from different domains.
*/
CTASSERT((sizeof(*pvd) == 64));
CTASSERT(PAGE_SIZE % sizeof(*pvd) == 0);

/*
* Calculate the size of the array.
Expand Down

0 comments on commit 101e825

Please sign in to comment.