summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/include/pmap.h3
-rw-r--r--sys/arch/sparc/sparc/pmap.c21
2 files changed, 22 insertions, 2 deletions
diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h
index 8e0e2a94973..449c5b6eb6e 100644
--- a/sys/arch/sparc/include/pmap.h
+++ b/sys/arch/sparc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.41 2007/06/06 17:15:12 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.42 2007/09/10 18:49:45 miod Exp $ */
/* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */
/*
@@ -283,6 +283,7 @@ vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
void pmap_reference(pmap_t);
void pmap_release(pmap_t);
void pmap_remove(pmap_t, vaddr_t, vaddr_t);
+void pmap_remove_holes(struct vm_map *);
int pmap_page_index(paddr_t);
void pmap_virtual_space(vaddr_t *, vaddr_t *);
void pmap_redzone(void);
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 5eceee1cffd..56f03b9ccb6 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.145 2007/06/06 17:15:12 deraadt Exp $ */
+/* $OpenBSD: pmap.c,v 1.146 2007/09/10 18:49:45 miod Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -6151,6 +6151,25 @@ pmap_prefer(foff, vap)
}
void
+pmap_remove_holes(struct vm_map *map)
+{
+#if defined(SUN4) || defined(SUN4C)
+ if (mmu_has_hole) {
+ vaddr_t shole, ehole;
+
+ shole = max(vm_map_min(map), (vaddr_t)MMU_HOLE_START);
+ ehole = min(vm_map_max(map), (vaddr_t)MMU_HOLE_END);
+
+ if (ehole <= shole)
+ return;
+
+ uvm_map_reserve(map, ehole - shole, UVM_UNKNOWN_OFFSET,
+ 0, &shole);
+ }
+#endif
+}
+
+void
pmap_redzone()
{
#if defined(SUN4M)