PERFORCE change 131305 for review
Rafal Jaworowski
raj at FreeBSD.org
Thu Dec 20 04:47:52 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131305
Change 131305 by raj at raj_mimi on 2007/12/20 12:47:41
Catch up with recent -current merges, so e500 builds again
Affected files ...
.. //depot/projects/e500/sys/powerpc/booke/machdep.c#3 edit
.. //depot/projects/e500/sys/powerpc/booke/pmap.c#4 edit
Differences ...
==== //depot/projects/e500/sys/powerpc/booke/machdep.c#3 (text+ko) ====
@@ -162,8 +162,6 @@
struct bootinfo *bootinfo;
-extern vm_offset_t kstack0[];
-
char machine[] = "powerpc";
SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "");
==== //depot/projects/e500/sys/powerpc/booke/pmap.c#4 (text+ko) ====
@@ -1241,7 +1241,7 @@
* Initialize a preallocated and zeroed pmap structure,
* such as one in a vmspace structure.
*/
-void
+int
pmap_pinit(pmap_t pmap)
{
//struct thread *td;
@@ -1263,6 +1263,7 @@
TAILQ_INIT(&pmap->ptbl_list);
//debugf("pmap_pinit: e\n");
+ return (1);
}
/*
@@ -2162,6 +2163,33 @@
return (FALSE);
}
+/*
+ * Return the number of managed mappings to the given physical page that are
+ * wired.
+ */
+int
+pmap_page_wired_mappings(vm_page_t m)
+{
+ pv_entry_t pv;
+ pte_t *pte;
+ pmap_t pmap;
+ int count;
+
+ count = 0;
+ if ((m->flags & PG_FICTITIOUS) != 0)
+ return (count);
+ mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+ TAILQ_FOREACH(pv, &m->md.pv_list, pv_link) {
+ pmap = pv->pv_pmap;
+ PMAP_LOCK(pmap);
+ if ((pte = pte_find(pmap, pv->pv_va)) != NULL)
+ if (PTE_ISWIRED(pte))
+ count++;
+ PMAP_UNLOCK(pmap);
+ }
+ return (count);
+}
+
int
pmap_dev_direct_mapped(vm_offset_t pa, vm_size_t size)
{
More information about the p4-projects
mailing list