git: e79b1f0fc159 - main - powerpc: silence compiler warning

From: Doug Moore <dougm_at_FreeBSD.org>
Date: Mon, 21 Apr 2025 03:51:17 UTC
The branch main has been updated by dougm:

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

commit e79b1f0fc15919648c0a8e4e43ef12aaaaae006f
Author:     Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2025-04-21 03:48:57 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2025-04-21 03:51:07 +0000

    powerpc: silence compiler warning
    
    Function moea64_sp_demote_aligned() is only invoked if VM_NRESERVLEVEL
    > 0.  Add #if/#endif pairs around the declaration and definition of
    that function to silence warnings about unused static functions.
    
    Reviewed by:    kib
---
 sys/powerpc/aim/mmu_oea64.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 273dc38214e2..7e23d73557a5 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -364,7 +364,9 @@ static int moea64_sp_enter(pmap_t pmap, vm_offset_t va,
 static struct pvo_entry *moea64_sp_remove(struct pvo_entry *sp,
     struct pvo_dlist *tofree);
 
+#if VM_NRESERVLEVEL > 0
 static void moea64_sp_promote(pmap_t pmap, vm_offset_t va, vm_page_t m);
+#endif
 static void moea64_sp_demote_aligned(struct pvo_entry *sp);
 static void moea64_sp_demote(struct pvo_entry *pvo);
 
@@ -3794,6 +3796,7 @@ moea64_sp_enter(pmap_t pmap, vm_offset_t va, vm_page_t m,
 	return (KERN_SUCCESS);
 }
 
+#if VM_NRESERVLEVEL > 0
 static void
 moea64_sp_promote(pmap_t pmap, vm_offset_t va, vm_page_t m)
 {
@@ -3920,6 +3923,7 @@ error:
 	atomic_add_long(&sp_p_failures, 1);
 	PMAP_UNLOCK(pmap);
 }
+#endif
 
 static void
 moea64_sp_demote_aligned(struct pvo_entry *sp)