summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2011-05-30 22:25:25 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2011-05-30 22:25:25 +0000
commit4ed4f8dde5fa32c869d6204b0110b4b40f3e5a2e (patch)
tree64c44ccc81ef23bb074f8cb14168a349bf4cfd8c /sys/arch/i386
parent973b968f1e5f9aebd5ffdbba3ea1a2c40be6e98e (diff)
Remove the freelist member from vm_physseg
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist. While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it. Should shrink the code a bit, as well. matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/machdep.c24
-rw-r--r--sys/arch/i386/include/vmparam.h6
2 files changed, 4 insertions, 26 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 94ed6a5197e..3d599c6bbde 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.496 2011/05/29 14:50:26 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.497 2011/05/30 22:25:21 oga Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -3142,12 +3142,11 @@ init386(paddr_t first_avail)
#ifdef DEBUG
printf(" %x-%x (<16M)", lim, kb);
#endif
- uvm_page_physload(lim, kb, lim, kb, VM_FREELIST_FIRST16);
+ uvm_page_physload(lim, kb, lim, kb, 0);
}
for (i = 0; i < ndumpmem; i++) {
paddr_t a, e;
- paddr_t lim;
a = dumpmem[i].start;
e = dumpmem[i].end;
@@ -3157,27 +3156,10 @@ init386(paddr_t first_avail)
e = atop(avail_end);
if (a < e) {
- if (a < atop(16 * 1024 * 1024)) {
- lim = MIN(atop(16 * 1024 * 1024), e);
-#ifdef DEBUG
- printf(" %x-%x (<16M)", a, lim);
-#endif
- uvm_page_physload(a, lim, a, lim,
- VM_FREELIST_FIRST16);
- if (e > lim) {
-#ifdef DEBUG
- printf(" %x-%x", lim, e);
-#endif
- uvm_page_physload(lim, e, lim, e,
- VM_FREELIST_DEFAULT);
- }
- } else {
#ifdef DEBUG
printf(" %x-%x", a, e);
#endif
- uvm_page_physload(a, e, a, e,
- VM_FREELIST_DEFAULT);
- }
+ uvm_page_physload(a, e, a, e, 0);
}
}
#ifdef DEBUG
diff --git a/sys/arch/i386/include/vmparam.h b/sys/arch/i386/include/vmparam.h
index a515322edc0..5ec9bffebf5 100644
--- a/sys/arch/i386/include/vmparam.h
+++ b/sys/arch/i386/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.47 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: vmparam.h,v 1.48 2011/05/30 22:25:21 oga Exp $ */
/* $NetBSD: vmparam.h,v 1.15 1994/10/27 04:16:34 cgd Exp $ */
/*-
@@ -117,10 +117,6 @@
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
-#define VM_NFREELIST 2
-#define VM_FREELIST_DEFAULT 0
-#define VM_FREELIST_FIRST16 1
-
#define __HAVE_VM_PAGE_MD
struct pv_entry;
struct vm_page_md {