diff --git a/sys/conf/options.riscv b/sys/conf/options.riscv --- a/sys/conf/options.riscv +++ b/sys/conf/options.riscv @@ -1,3 +1,3 @@ - RISCV opt_global.h # For cpu RISCV to work INTRNG opt_global.h +PV_STATS opt_pmap.h diff --git a/sys/riscv/conf/NOTES b/sys/riscv/conf/NOTES --- a/sys/riscv/conf/NOTES +++ b/sys/riscv/conf/NOTES @@ -17,6 +17,9 @@ options DDB_CTF # Kernel ELF linker loads CTF data options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +# Enable detailed accounting by the PV entry allocator. +options PV_STATS + # RISC-V SBI console device rcons diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -93,7 +93,6 @@ * SUCH DAMAGE. */ -#include /* * Manages physical address maps. * @@ -113,6 +112,8 @@ * and to when physical maps must be made correct. */ +#include "opt_pmap.h" + #include #include #include @@ -1910,7 +1911,6 @@ [_NPCM - 1] = PC_FREEL }; -#if 0 #ifdef PV_STATS static int pc_chunk_count, pc_chunk_allocs, pc_chunk_frees, pc_chunk_tryfail; @@ -1935,7 +1935,6 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); #endif -#endif /* 0 */ /* * We are in a serious low memory condition. Resort to