From 93798030db00d191a159608b4ae43772d31f17f3 Mon Sep 17 00:00:00 2001 From: "jbranso@dismail.de" Date: Sun, 20 Oct 2024 15:07:43 -0400 Subject: fix a compiler warning. * i386/intel/pmap.c (pmap_page_table_page_dealloc): define it only on the Xen platform. Best not to delete page_alloc, so we know how to do so if need be. i386/intel/pmap.c:1265:1: warning: 'pmap_page_table_page_dealloc' defined but not used [-Wunused-function] 1265 | pmap_page_table_page_dealloc(vm_offset_t pa) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ i386/intel/pmap.c:1171:1: warning: 'pmap_page_table_page_alloc' defined but not used [-Wunused-function] 1171 | pmap_page_table_page_alloc(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Message-ID: <20241020190744.2522-3-jbranso@dismail.de> --- i386/intel/pmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 94c580e7..e5810b0e 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -1167,6 +1167,7 @@ valid_page(phys_addr_t addr) * Must be called with the pmap system and the pmap unlocked, * since these must be unlocked to use vm_page_grab. */ +#ifdef MACH_XEN static vm_offset_t pmap_page_table_page_alloc(void) { @@ -1210,6 +1211,7 @@ pmap_page_table_page_alloc(void) return pa; } +#endif #ifdef MACH_XEN void pmap_map_mfn(void *_addr, unsigned long mfn) { @@ -1261,6 +1263,7 @@ void pmap_map_mfn(void *_addr, unsigned long mfn) { * The page-table page must have all mappings removed, * and be removed from its page directory. */ +#ifdef MACH_XEN static void pmap_page_table_page_dealloc(vm_offset_t pa) { @@ -1279,6 +1282,7 @@ pmap_page_table_page_dealloc(vm_offset_t pa) vm_page_unlock_queues(); vm_object_unlock(pmap_object); } +#endif /* * Create and return a physical map. -- cgit v1.2.3