git: 59446e8ac008 - main - Fix !INVARIANTS build.

From: Ruslan Bukin <br_at_FreeBSD.org>
Date: Sat, 07 May 2022 09:46:18 UTC
The branch main has been updated by br:

URL: https://cgit.FreeBSD.org/src/commit/?id=59446e8ac0087eb91fd8b7238cbfd10f06a8ed2d

commit 59446e8ac0087eb91fd8b7238cbfd10f06a8ed2d
Author:     Ruslan Bukin <br@FreeBSD.org>
AuthorDate: 2022-05-07 09:44:54 +0000
Commit:     Ruslan Bukin <br@FreeBSD.org>
CommitDate: 2022-05-07 09:45:33 +0000

    Fix !INVARIANTS build.
    
    Sponsored by:   UKRI
---
 sys/arm64/iommu/iommu.c      | 4 +---
 sys/arm64/iommu/iommu_pmap.c | 8 +++++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c
index e7f51e8693a1..690c11f4777c 100644
--- a/sys/arm64/iommu/iommu.c
+++ b/sys/arm64/iommu/iommu.c
@@ -299,9 +299,7 @@ iommu_domain_unload(struct iommu_domain *iodom,
     struct iommu_map_entries_tailq *entries, bool cansleep)
 {
 	struct iommu_map_entry *entry, *entry1;
-#ifdef INVARIANTS
-	int error;
-#endif
+	int error __unused;
 
 	TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) {
 		KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0,
diff --git a/sys/arm64/iommu/iommu_pmap.c b/sys/arm64/iommu/iommu_pmap.c
index 586620ef9ba9..06775efedfe9 100644
--- a/sys/arm64/iommu/iommu_pmap.c
+++ b/sys/arm64/iommu/iommu_pmap.c
@@ -560,7 +560,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex)
 void
 iommu_pmap_release(pmap_t pmap)
 {
-	boolean_t rv;
+	boolean_t rv __unused;
 	struct spglist free;
 	vm_page_t m;
 
@@ -603,7 +603,8 @@ pmap_gpu_enter(pmap_t pmap, vm_offset_t va, vm_paddr_t pa,
     vm_prot_t prot, u_int flags)
 {
 	pd_entry_t *pde;
-	pt_entry_t new_l3, orig_l3;
+	pt_entry_t new_l3;
+	pt_entry_t orig_l3 __unused;
 	pt_entry_t *l3;
 	vm_page_t mpte;
 	pd_entry_t *l1p;
@@ -720,7 +721,8 @@ pmap_smmu_enter(pmap_t pmap, vm_offset_t va, vm_paddr_t pa,
     vm_prot_t prot, u_int flags)
 {
 	pd_entry_t *pde;
-	pt_entry_t new_l3, orig_l3;
+	pt_entry_t new_l3;
+	pt_entry_t orig_l3 __unused;
 	pt_entry_t *l3;
 	vm_page_t mpte;
 	int lvl;