aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-11-18 17:04:04 +0000
committerWarner Losh <imp@FreeBSD.org>2022-11-18 17:04:04 +0000
commit1a1fd76d0a36f2d0502836841f0e283597ffcc4d (patch)
treec49022a311bb9a597400b005e20678bdebae10de
parentcf325fda86ed7b68faaac85e0afaa828f618d198 (diff)
downloadsrc-1a1fd76d0a36f2d0502836841f0e283597ffcc4d.tar.gz
src-1a1fd76d0a36f2d0502836841f0e283597ffcc4d.zip
arm64/pmap: freed only used for PV_STATS
When PV_STATS is defined, freed is used. Otherwise it isn't. Mark it as __pvused and define __pvused appropriately. Sponsored by: Netflix Reviewed by: tsoome, rpokala, andrew Differential Revision: https://reviews.freebsd.org/D37438
-rw-r--r--sys/arm64/arm64/pmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 7df16bc41922..3f4665921631 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -180,8 +180,10 @@ __FBSDID("$FreeBSD$");
#ifdef PV_STATS
#define PV_STAT(x) do { x ; } while (0)
+#define __pvused
#else
#define PV_STAT(x) do { } while (0)
+#define __pvused __unused
#endif
#define pmap_l0_pindex(v) (NUL2E + NUL1E + ((v) >> L0_SHIFT))
@@ -5405,7 +5407,8 @@ pmap_remove_pages(pmap_t pmap)
struct rwlock *lock;
int64_t bit;
uint64_t inuse, bitmask;
- int allfree, field, freed, i, idx, lvl;
+ int allfree, field, i, idx, lvl;
+ int freed __pvused;
vm_paddr_t pa;
lock = NULL;