Define _NPCM and the last PC_FREEn constant in terms of _NPCPV.

This applies one of the changes from
5567d6b441 to other architectures
besides arm64.

Reviewed by:	kib
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D36263
This commit is contained in:
John Baldwin
2022-08-23 13:31:02 -07:00
parent 9488262679
commit e663907366
10 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -2753,7 +2753,7 @@ pv_to_chunk(pv_entry_t pv)
#define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap)
#define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */
#define PC_FREE10 0x0000fffful /* Free values for index 10 */
#define PC_FREE10 ((1ul << (_NPCPV % 32)) - 1) /* Free values for index 10 */
static const uint32_t pc_freemask[_NPCM] = {
PC_FREE0_9, PC_FREE0_9, PC_FREE0_9,
+2 -1
View File
@@ -143,8 +143,9 @@ typedef struct pv_entry {
* pv_entries are allocated in chunks per-process. This avoids the
* need to track per-pmap assignments.
*/
#define _NPCM 11
#define _NPCPV 336
#define _NPCM howmany(_NPCPV, 32)
struct pv_chunk {
pmap_t pc_pmap;
TAILQ_ENTRY(pv_chunk) pc_list;