aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbranso@dismail.de <jbranso@dismail.de>2024-10-20 15:07:43 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-10-21 00:35:10 +0200
commit93798030db00d191a159608b4ae43772d31f17f3 (patch)
treec4cae41e739ea1db0bb10bf3464da9f0d5f7cdae
parent7d935dedcb960f09986795d1245cb574fa2ca995 (diff)
downloadgnumach-93798030db00d191a159608b4ae43772d31f17f3.tar.gz
gnumach-93798030db00d191a159608b4ae43772d31f17f3.tar.bz2
gnumach-93798030db00d191a159608b4ae43772d31f17f3.zip
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>
-rw-r--r--i386/intel/pmap.c4
1 files changed, 4 insertions, 0 deletions
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.