Date: Tue, 21 Jan 2003 09:58:59 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: freebsd-ppc@freebsd.org Subject: pmap_remove_all() Message-ID: <15917.24627.430905.314812@grasshopper.cs.duke.edu>
index | next in thread | raw e-mail
The kernel currently does not link because pmap_remove_all() isn't
implemented for powerpc, and pagedaemon_waken isn't declared.
Appended is a patch which fixes this. I have no idea if it works,
(and no time to test) but it does make the kernel compile and link...
FWIW, my pmap_remove_all() is based on the guts of
pmap_page_protect(), so if pmap_page_protect() works,
pmap_remove_all() should work too..
Drew
Index: powerpc/powerpc/pmap.c
===================================================================
RCS file: /home/ncvs/src/sys/powerpc/powerpc/pmap.c,v
retrieving revision 1.50
diff -u -r1.50 pmap.c
--- powerpc/powerpc/pmap.c 13 Nov 2002 05:39:58 -0000 1.50
+++ powerpc/powerpc/pmap.c 21 Jan 2003 14:52:44 -0000
@@ -190,6 +190,7 @@
};
int pmap_bootstrapped = 0;
+int pmap_pagedaemon_waken;
/*
* Virtual and physical address of message buffer.
@@ -1243,6 +1244,25 @@
("pmap_remove_pages: non current pmap"));
/* XXX */
}
+
+/*
+ * Remove this page from all mappings
+ */
+
+void
+pmap_remove_all(vm_page_t m)
+{
+ struct pvo_head *pvo_head;
+ struct pvo_entry *pvo, *next_pvo;
+
+ pvo_head = vm_page_to_pvoh(m);
+ for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) {
+ next_pvo = LIST_NEXT(pvo, pvo_vlink);
+ PMAP_PVO_CHECK(pvo); /* sanity check */
+ pmap_pvo_remove(pvo, -1);
+ }
+}
+
/*
* Lower the permission for all mappings to a given page.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ppc" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15917.24627.430905.314812>
