From owner-freebsd-ppc Tue Jan 21 6:59:12 2003 Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECF8B37B401 for ; Tue, 21 Jan 2003 06:59:10 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E61F43F13 for ; Tue, 21 Jan 2003 06:59:10 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.6/8.12.6) with ESMTP id h0LEx4ro029167 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 21 Jan 2003 09:59:04 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id h0LEwxx88613; Tue, 21 Jan 2003 09:58:59 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15917.24627.430905.314812@grasshopper.cs.duke.edu> Date: Tue, 21 Jan 2003 09:58:59 -0500 (EST) To: freebsd-ppc@freebsd.org Subject: pmap_remove_all() X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-ppc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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