summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-02-15 21:34:34 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-02-15 21:34:34 +0000
commite2b2dd619edd58f49d6ce8b43c1da41d66e9a7eb (patch)
tree69faf09b84dc583d6dd2a6afb7c4d7caf470743f /sys/arch
parent43cbd5fb7af372c4817d128b7914b3ab3e010117 (diff)
Change pmap_remove_holes() to take a vmspace instead of a map as its argument.
Use this on vax to correctly pick the end of the stack area now that the stackgap adjustment code will no longer guarantee it is a fixed location.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/include/pmap.h4
-rw-r--r--sys/arch/amd64/include/pmap.h4
-rw-r--r--sys/arch/arm/include/pmap.h4
-rw-r--r--sys/arch/hppa/include/pmap.h4
-rw-r--r--sys/arch/hppa64/include/pmap.h4
-rw-r--r--sys/arch/i386/include/pmap.h4
-rw-r--r--sys/arch/m88k/include/pmap.h4
-rw-r--r--sys/arch/mips64/include/pmap.h4
-rw-r--r--sys/arch/powerpc/include/pmap.h4
-rw-r--r--sys/arch/sh/include/pmap.h4
-rw-r--r--sys/arch/solbourne/include/pmap.h4
-rw-r--r--sys/arch/sparc/include/pmap.h4
-rw-r--r--sys/arch/sparc/sparc/pmap.c5
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c5
-rw-r--r--sys/arch/vax/vax/pmap.c7
15 files changed, 34 insertions, 31 deletions
diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h
index ed80570e1e5..861ed9e58e1 100644
--- a/sys/arch/alpha/include/pmap.h
+++ b/sys/arch/alpha/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.35 2015/02/11 01:13:22 dlg Exp $ */
+/* $OpenBSD: pmap.h,v 1.36 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */
/*-
@@ -179,7 +179,7 @@ void pmap_do_tlb_shootdown(struct cpu_info *, struct trapframe *);
#define pmap_proc_iflush(p, va, len) /* nothing */
#define pmap_unuse_final(p) /* nothing */
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
extern pt_entry_t *VPT; /* Virtual Page Table */
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h
index 45a37aadbe0..3d056db5bfa 100644
--- a/sys/arch/amd64/include/pmap.h
+++ b/sys/arch/amd64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.52 2015/02/07 01:46:27 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.53 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
@@ -375,7 +375,7 @@ extern long nkptp[], nbpd[], nkptpmax[];
#define pmap_proc_iflush(p,va,len) /* nothing */
#define pmap_unuse_final(p) /* nothing */
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
/*
diff --git a/sys/arch/arm/include/pmap.h b/sys/arch/arm/include/pmap.h
index cd82d00b131..288ca5ba92b 100644
--- a/sys/arch/arm/include/pmap.h
+++ b/sys/arch/arm/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.31 2015/02/07 01:46:27 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.32 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */
/*
@@ -243,7 +243,7 @@ extern int pmap_debug_level; /* Only exists if PMAP_DEBUG */
#define pmap_copy(dp, sp, da, l, sa) do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
/*
* Functions that we need to export
diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h
index 70609ea7151..946e3eaa04a 100644
--- a/sys/arch/hppa/include/pmap.h
+++ b/sys/arch/hppa/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.48 2015/02/11 06:43:27 dlg Exp $ */
+/* $OpenBSD: pmap.h,v 1.49 2015/02/15 21:34:33 miod Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -117,7 +117,7 @@ pmap_prefer(vaddr_t offs, vaddr_t hint)
#define pmap_is_referenced(pg) pmap_testbit(pg, PTE_PROT(TLB_REFTRAP))
#define pmap_unuse_final(p) /* nothing */
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
void pmap_bootstrap(vaddr_t);
boolean_t pmap_changebit(struct vm_page *, pt_entry_t, pt_entry_t);
diff --git a/sys/arch/hppa64/include/pmap.h b/sys/arch/hppa64/include/pmap.h
index c9ce9c34661..36f8d981015 100644
--- a/sys/arch/hppa64/include/pmap.h
+++ b/sys/arch/hppa64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.14 2014/12/17 15:26:21 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.15 2015/02/15 21:34:33 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -104,7 +104,7 @@ pmap_prefer(vaddr_t offs, vaddr_t hint)
#define pmap_is_referenced(pg) pmap_testbit(pg, PTE_REFTRAP)
#define pmap_unuse_final(p) /* nothing */
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
void pmap_bootstrap(vaddr_t);
boolean_t pmap_changebit(struct vm_page *, pt_entry_t, pt_entry_t);
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index d8dd8733296..5f0422529e9 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.70 2015/01/09 03:43:52 mlarkin Exp $ */
+/* $OpenBSD: pmap.h,v 1.71 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -350,7 +350,7 @@ extern int pmap_pg_g; /* do we support PG_G? */
#define pmap_proc_iflush(p,va,len) /* nothing */
#define pmap_unuse_final(p) /* nothing */
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
/*
diff --git a/sys/arch/m88k/include/pmap.h b/sys/arch/m88k/include/pmap.h
index 73b9a15b2f6..beef4202ee2 100644
--- a/sys/arch/m88k/include/pmap.h
+++ b/sys/arch/m88k/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.24 2014/01/30 18:16:41 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.25 2015/02/15 21:34:33 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1991 Carnegie Mellon University
@@ -66,7 +66,7 @@ void pmap_unmap_firmware(void);
boolean_t pmap_unsetbit(struct vm_page *, int);
#define pmap_unuse_final(p) /* nothing */
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
int pmap_translation_info(pmap_t, vaddr_t, paddr_t *, uint32_t *);
/*
diff --git a/sys/arch/mips64/include/pmap.h b/sys/arch/mips64/include/pmap.h
index 88f7f3d3ae0..fa47de3f1d3 100644
--- a/sys/arch/mips64/include/pmap.h
+++ b/sys/arch/mips64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.37 2014/12/17 15:05:52 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.38 2015/02/15 21:34:33 miod Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -162,7 +162,7 @@ void pmap_page_cache(vm_page_t, u_int);
#define pmap_collect(x) do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing yet */ } while (0)
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
void pmap_update_user_page(pmap_t, vaddr_t, pt_entry_t);
#ifdef MULTIPROCESSOR
diff --git a/sys/arch/powerpc/include/pmap.h b/sys/arch/powerpc/include/pmap.h
index a6eaa1963e2..ba66701637c 100644
--- a/sys/arch/powerpc/include/pmap.h
+++ b/sys/arch/powerpc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.54 2015/02/09 13:35:43 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.55 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */
/*-
@@ -146,7 +146,7 @@ int pte_spill_v(struct pmap *pm, u_int32_t va, u_int32_t dsisr, int exec_fault);
int reserve_dumppages(caddr_t p);
#define pmap_unuse_final(p) /* nothing */
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
#define PMAP_STEAL_MEMORY
diff --git a/sys/arch/sh/include/pmap.h b/sys/arch/sh/include/pmap.h
index ebcfc99b23d..06b1c48236c 100644
--- a/sys/arch/sh/include/pmap.h
+++ b/sys/arch/sh/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.13 2014/01/30 18:16:41 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.14 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */
/*-
@@ -59,7 +59,7 @@ extern struct pmap __pmap_kernel;
void pmap_bootstrap(void);
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
#define pmap_kernel() (&__pmap_kernel)
#define pmap_deactivate(pmap) do { /* nothing */ } while (0)
#define pmap_update(pmap) do { /* nothing */ } while (0)
diff --git a/sys/arch/solbourne/include/pmap.h b/sys/arch/solbourne/include/pmap.h
index 50cbc89af4c..fc2ea553806 100644
--- a/sys/arch/solbourne/include/pmap.h
+++ b/sys/arch/solbourne/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.9 2014/12/17 15:27:17 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.10 2015/02/15 21:34:33 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -71,7 +71,7 @@ extern struct pmap kernel_pmap_store;
#define pmap_resident_count(p) ((p)->pm_stats.resident_count)
#define pmap_update(p) do { /* nothing */ } while (0)
#define pmap_wired_count(p) ((p)->pm_stats.wired_count)
-#define pmap_remove_holes(map) do { /* nothing */ } while (0)
+#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
#define PMAP_PREFER(fo, ap) pmap_prefer((fo), (ap))
diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h
index 5186f89822a..11b50654fea 100644
--- a/sys/arch/sparc/include/pmap.h
+++ b/sys/arch/sparc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.56 2014/12/17 06:05:51 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.57 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */
/*
@@ -263,7 +263,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 *);
+void pmap_remove_holes(struct vmspace *);
void pmap_virtual_space(vaddr_t *, vaddr_t *);
void pmap_redzone(void);
void kvm_setcache(caddr_t, int, int);
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 210566b662a..fdd0d195374 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.173 2015/02/11 07:05:39 dlg Exp $ */
+/* $OpenBSD: pmap.c,v 1.174 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -6241,10 +6241,11 @@ pmap_prefer(vaddr_t foff, vaddr_t va)
}
void
-pmap_remove_holes(struct vm_map *map)
+pmap_remove_holes(struct vmspace *vm)
{
#if defined(SUN4) || defined(SUN4C) || defined(SUN4E)
if (mmu_has_hole) {
+ struct vm_map *map = &vm->vm_map;
vaddr_t shole, ehole;
shole = max(vm_map_min(map), (vaddr_t)MMU_HOLE_START);
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index 6253b8524db..e657af8aeca 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.87 2015/02/10 01:59:43 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.88 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -2901,9 +2901,10 @@ pmap_free_page(paddr_t pa, struct pmap *pm)
}
void
-pmap_remove_holes(struct vm_map *map)
+pmap_remove_holes(struct vmspace *vm)
{
vaddr_t shole, ehole;
+ struct vm_map *map = &vm->vm_map;
/*
* Although the hardware only supports 44-bit virtual addresses
diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c
index 6a51efe013e..f456233f11f 100644
--- a/sys/arch/vax/vax/pmap.c
+++ b/sys/arch/vax/vax/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.74 2014/12/17 06:58:10 guenther Exp $ */
+/* $OpenBSD: pmap.c,v 1.75 2015/02/15 21:34:33 miod Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */
/*
* Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
@@ -851,8 +851,9 @@ pmap_create()
}
void
-pmap_remove_holes(struct vm_map *map)
+pmap_remove_holes(struct vmspace *vm)
{
+ struct vm_map *map = &vm->vm_map;
struct pmap *pmap = map->pmap;
vaddr_t shole, ehole;
@@ -860,7 +861,7 @@ pmap_remove_holes(struct vm_map *map)
return;
shole = MAXTSIZ + MAXDSIZ + BRKSIZ;
- ehole = VM_MAXUSER_ADDRESS - MAXSSIZ;
+ ehole = (vaddr_t)vm->vm_maxsaddr;
shole = max(vm_map_min(map), shole);
ehole = min(vm_map_max(map), ehole);