summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-12-04 23:22:43 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-12-04 23:22:43 +0000
commit2d6ebc6b1044ef771b2b25c09c2abffe0c0a0d3d (patch)
treef85c4269fcfa3a0ec1575186dfcbcbbb1ebaf8d7 /sys/arch
parentf1bec1965343db9a80a80e7ed55ee2fe5dd36253 (diff)
Yet another sync to NetBSD uvm.
Today we add a pmap argument to pmap_update() and allocate map entries for kernel_map from kmem_map instead of using the static entries. This should get rid of MAX_KMAPENT panics. Also some uvm_loan problems are fixed.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/include/pmap.h4
-rw-r--r--sys/arch/i386/include/pmap.h4
-rw-r--r--sys/arch/sparc/include/pmap.h4
-rw-r--r--sys/arch/sparc64/dev/iommu.c8
-rw-r--r--sys/arch/sparc64/include/pmap.h2
-rw-r--r--sys/arch/sparc64/sparc64/cpu.c4
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c10
-rw-r--r--sys/arch/sparc64/sparc64/mem.c6
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c18
-rw-r--r--sys/arch/sparc64/sparc64/vm_machdep.c6
-rw-r--r--sys/arch/vax/include/pmap.h4
11 files changed, 35 insertions, 35 deletions
diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h
index d8a11ebbaed..7f59dfd0cca 100644
--- a/sys/arch/hppa/include/pmap.h
+++ b/sys/arch/hppa/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.14 2001/05/09 15:31:24 art Exp $ */
+/* $OpenBSD: pmap.h,v 1.15 2001/12/04 23:22:42 art Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -183,7 +183,7 @@ do { if (pmap) { \
#define pmap_collect(pmap)
#define pmap_release(pmap)
#define pmap_copy(dpmap,spmap,da,len,sa)
-#define pmap_update()
+#define pmap_update(pm)
#define pmap_activate(p)
#define pmap_deactivate(p)
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index eb179fb4e2a..ab91dd6240b 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.20 2001/11/28 16:13:28 art Exp $ */
+/* $OpenBSD: pmap.h,v 1.21 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -375,7 +375,7 @@ extern int pmap_pg_g; /* do we support PG_G? */
#define pmap_kernel() (&kernel_pmap_store)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
-#define pmap_update() /* nada */
+#define pmap_update(pm) /* nada */
#define pmap_clear_modify(pg) pmap_change_attrs(pg, 0, PG_M)
#define pmap_clear_reference(pg) pmap_change_attrs(pg, 0, PG_U)
diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h
index 8528857e21d..04c6dc27f35 100644
--- a/sys/arch/sparc/include/pmap.h
+++ b/sys/arch/sparc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.25 2001/11/28 15:34:16 art Exp $ */
+/* $OpenBSD: pmap.h,v 1.26 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */
/*
@@ -295,7 +295,7 @@ void pmap_pinit __P((pmap_t));
void pmap_reference __P((pmap_t));
void pmap_release __P((pmap_t));
void pmap_remove __P((pmap_t, vaddr_t, vaddr_t));
-#define pmap_update() /* nothing */
+#define pmap_update(pm) /* nothing */
void pmap_init __P((void));
int pmap_page_index __P((paddr_t));
void pmap_virtual_space __P((vaddr_t *, vaddr_t *));
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c
index 9fe244ca7d8..fed8646aac6 100644
--- a/sys/arch/sparc64/dev/iommu.c
+++ b/sys/arch/sparc64/dev/iommu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iommu.c,v 1.6 2001/11/06 19:53:16 miod Exp $ */
+/* $OpenBSD: iommu.c,v 1.7 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: iommu.c,v 1.42 2001/10/07 20:30:40 eeh Exp $ */
/*
@@ -224,7 +224,7 @@ iommu_init(name, is, tsbsize, iovabase)
VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED);
va += NBPG;
}
- pmap_update();
+ pmap_update(pmap_kernel());
bzero(is->is_tsb, size);
#ifdef DEBUG
@@ -1114,7 +1114,7 @@ iommu_dvmamem_map(t, is, segs, nsegs, size, kvap, flags)
va += PAGE_SIZE;
size -= PAGE_SIZE;
}
- pmap_update();
+ pmap_update(pmap_kernel());
return (0);
}
@@ -1140,7 +1140,7 @@ iommu_dvmamem_unmap(t, is, kva, size)
size = round_page(size);
pmap_remove(pmap_kernel(), (vaddr_t)kva, size);
- pmap_update();
+ pmap_update(pmap_kernel());
#if 0
/*
* XXX ? is this necessary? i think so and i think other
diff --git a/sys/arch/sparc64/include/pmap.h b/sys/arch/sparc64/include/pmap.h
index 1032af946e2..703e1f79b8c 100644
--- a/sys/arch/sparc64/include/pmap.h
+++ b/sys/arch/sparc64/include/pmap.h
@@ -161,7 +161,7 @@ int pmap_count_res __P((pmap_t pmap));
#define pmap_resident_count(pm) pmap_count_res((pm))
#define pmap_from_phys_address(x,f) ((x)>>PGSHIFT)
#define pmap_phys_address(x) ((((paddr_t)(x))<<PGSHIFT)|PMAP_NC)
-#define pmap_update() /* nothing (yet) */
+#define pmap_update(pm) /* nothing (yet) */
void pmap_bootstrap __P((u_long kernelstart, u_long kernelend, u_int numctx));
/* make sure all page mappings are modulo 16K to prevent d$ aliasing */
diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c
index cae2e42a97d..ac956172ed9 100644
--- a/sys/arch/sparc64/sparc64/cpu.c
+++ b/sys/arch/sparc64/sparc64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.4 2001/11/06 19:53:16 miod Exp $ */
+/* $OpenBSD: cpu.c,v 1.5 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */
/*
@@ -176,7 +176,7 @@ cpu_init(pa, cpu_num)
VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED);
va += NBPG;
}
- pmap_update();
+ pmap_update(pmap_kernel());
if (!cpus) cpus = (struct cpu_info *)va;
else {
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index 032da939c6f..af88ec22202 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.26 2001/11/24 17:53:41 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.27 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -307,7 +307,7 @@ cpu_startup()
curbufsize -= PAGE_SIZE;
}
}
- pmap_update();
+ pmap_update(pmap_kernel());
/*
* Allocate a submap for exec arguments. This map effectively
@@ -973,11 +973,11 @@ printf("starting dump, blkno %d\n", blkno);
printf("%d ", i / (1024*1024));
(void) pmap_enter(pmap_kernel(), dumpspace, maddr,
VM_PROT_READ, VM_PROT_READ|PMAP_WIRED);
- pmap_update();
+ pmap_update(pmap_kernel());
error = (*dump)(dumpdev, blkno,
(caddr_t)dumpspace, (int)n);
pmap_remove(pmap_kernel(), dumpspace, dumpspace + n);
- pmap_update();
+ pmap_update(pmap_kernel());
if (error)
break;
maddr += n;
@@ -1768,7 +1768,7 @@ sparc_bus_map(t, iospace, addr, size, flags, vaddr, hp)
v += PAGE_SIZE;
pa += PAGE_SIZE;
} while ((size -= PAGE_SIZE) > 0);
- pmap_update();
+ pmap_update(pmap_kernel());
return (0);
}
diff --git a/sys/arch/sparc64/sparc64/mem.c b/sys/arch/sparc64/sparc64/mem.c
index 99f01729de4..bf25de2132d 100644
--- a/sys/arch/sparc64/sparc64/mem.c
+++ b/sys/arch/sparc64/sparc64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.5 2001/11/06 19:53:16 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.6 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: mem.c,v 1.18 2001/04/24 04:31:12 thorpej Exp $ */
/*
@@ -139,13 +139,13 @@ mmrw(dev, uio, flags)
VM_PROT_WRITE;
pmap_enter(pmap_kernel(), (vaddr_t)vmmap,
trunc_page(v), prot, prot|PMAP_WIRED);
- pmap_update();
+ pmap_update(pmap_kernel());
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(NBPG - o));
error = uiomove((caddr_t)vmmap + o, c, uio);
pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
(vaddr_t)vmmap + NBPG);
- pmap_update();
+ pmap_update(pmap_kernel());
break;
#else
/* On v9 we can just use the physical ASI and not bother w/mapin & mapout */
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index 69956edce3d..460480c3d83 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.7 2001/11/06 19:53:16 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.8 2001/12/04 23:22:42 art 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 */
#define HWREF
@@ -3876,7 +3876,7 @@ pmap_testout()
pg = vm_page_alloc1();
pa = (paddr_t)VM_PAGE_TO_PHYS(pg);
pmap_enter(pmap_kernel(), va, pa, VM_PROT_ALL, VM_PROT_ALL);
- pmap_update();
+ pmap_update(pmap_kernel());
/* Now clear reference and modify */
ref = pmap_clear_reference(pg);
@@ -3937,7 +3937,7 @@ pmap_testout()
/* Check pmap_protect() */
pmap_protect(pmap_kernel(), va, va+1, VM_PROT_READ);
- pmap_update();
+ pmap_update(pmap_kernel());
ref = pmap_is_referenced(pg);
mod = pmap_is_modified(pg);
printf("pmap_protect(VM_PROT_READ): ref %d, mod %d\n",
@@ -3952,7 +3952,7 @@ pmap_testout()
/* Modify page */
pmap_enter(pmap_kernel(), va, pa, VM_PROT_ALL, VM_PROT_ALL);
- pmap_update();
+ pmap_update(pmap_kernel());
*loc = 1;
ref = pmap_is_referenced(pg);
@@ -3962,7 +3962,7 @@ pmap_testout()
/* Check pmap_protect() */
pmap_protect(pmap_kernel(), va, va+1, VM_PROT_NONE);
- pmap_update();
+ pmap_update(pmap_kernel());
ref = pmap_is_referenced(pg);
mod = pmap_is_modified(pg);
printf("pmap_protect(VM_PROT_READ): ref %d, mod %d\n",
@@ -3977,7 +3977,7 @@ pmap_testout()
/* Modify page */
pmap_enter(pmap_kernel(), va, pa, VM_PROT_ALL, VM_PROT_ALL);
- pmap_update();
+ pmap_update(pmap_kernel());
*loc = 1;
ref = pmap_is_referenced(pg);
@@ -4002,7 +4002,7 @@ pmap_testout()
/* Modify page */
pmap_enter(pmap_kernel(), va, pa, VM_PROT_ALL, VM_PROT_ALL);
- pmap_update();
+ pmap_update(pmap_kernel());
*loc = 1;
ref = pmap_is_referenced(pg);
@@ -4026,7 +4026,7 @@ pmap_testout()
/* Unmap page */
pmap_remove(pmap_kernel(), va, va+1);
- pmap_update();
+ pmap_update(pmap_kernel());
ref = pmap_is_referenced(pg);
mod = pmap_is_modified(pg);
printf("Unmapped page: ref %d, mod %d\n", ref, mod);
@@ -4044,7 +4044,7 @@ pmap_testout()
ref, mod);
pmap_remove(pmap_kernel(), va, va+1);
- pmap_update();
+ pmap_update(pmap_kernel());
vm_page_free1(pg);
}
#endif
diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c
index 4b781e2e94d..d708018688e 100644
--- a/sys/arch/sparc64/sparc64/vm_machdep.c
+++ b/sys/arch/sparc64/sparc64/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.5 2001/11/06 19:53:16 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.6 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */
/*
@@ -99,7 +99,7 @@ pagemove(from, to, size)
to += PAGE_SIZE;
size -= PAGE_SIZE;
}
- pmap_update();
+ pmap_update(pmap_kernel());
}
/*
@@ -154,7 +154,7 @@ vmapbuf(bp, len)
kva += PAGE_SIZE;
len -= PAGE_SIZE;
} while (len);
- pmap_update();
+ pmap_update(pmap_kernel());
}
/*
diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h
index 2645763d069..50cbca23400 100644
--- a/sys/arch/vax/include/pmap.h
+++ b/sys/arch/vax/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.14 2001/11/28 15:34:17 art Exp $ */
+/* $OpenBSD: pmap.h,v 1.15 2001/12/04 23:22:42 art Exp $ */
/* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */
/*
@@ -124,7 +124,7 @@ extern struct pmap kernel_pmap_store;
/* Routines that are best to define as macros */
#define pmap_phys_address(phys) ((u_int)(phys) << PGSHIFT)
#define pmap_copy(a,b,c,d,e) /* Dont do anything */
-#define pmap_update() /* nothing */
+#define pmap_update(pm) /* nothing */
#define pmap_collect(pmap) /* No need so far */
#define pmap_remove(pmap, start, slut) pmap_protect(pmap, start, slut, 0)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)