git: 73cc3dbce13f - main - riscv pmap: Add an __unused wrapper for a variable only used under PV_STATS.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 May 2023 17:45:03 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=73cc3dbce13f987760112be95bf3f0d7a08a57d0
commit 73cc3dbce13f987760112be95bf3f0d7a08a57d0
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-05-25 17:44:53 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-25 17:44:53 +0000
riscv pmap: Add an __unused wrapper for a variable only used under PV_STATS.
---
sys/riscv/riscv/pmap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
index 5d35488c415c..ac3565ce69b1 100644
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -187,8 +187,10 @@ __FBSDID("$FreeBSD$");
#ifdef PV_STATS
#define PV_STAT(x) do { x ; } while (0)
+#define __pv_stat_used
#else
#define PV_STAT(x) do { } while (0)
+#define __pv_stat_used __unused
#endif
#define pmap_l1_pindex(v) (NUL2E + ((v) >> L1_SHIFT))
@@ -3895,7 +3897,7 @@ pmap_remove_pages(pmap_t pmap)
struct rwlock *lock;
int64_t bit;
uint64_t inuse, bitmask;
- int allfree, field, freed, idx;
+ int allfree, field, freed __pv_stat_used, idx;
bool superpage;
lock = NULL;