summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
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/loongson
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/loongson')
-rw-r--r--sys/arch/loongson/loongson/machdep.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index 4851338ad5c..74f99318e05 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.28 2011/05/25 21:22:27 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.29 2011/05/30 22:25:21 oga Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -456,7 +456,6 @@ mips_init(int32_t argc, int32_t argv, int32_t envp, int32_t cv,
for (i = 0; i < MAXMEMSEGS && mem_layout[i].mem_last_page != 0; i++) {
uint64_t fp, lp;
uint64_t firstkernpage, lastkernpage;
- unsigned int freelist;
paddr_t firstkernpa, lastkernpa;
/* kernel is linked in CKSEG0 */
@@ -470,14 +469,13 @@ mips_init(int32_t argc, int32_t argv, int32_t envp, int32_t cv,
fp = mem_layout[i].mem_first_page;
lp = mem_layout[i].mem_last_page;
- freelist = mem_layout[i].mem_freelist;
/* Account for kernel and kernel symbol table. */
if (fp >= firstkernpage && lp < lastkernpage)
continue; /* In kernel. */
if (lp < firstkernpage || fp > lastkernpage) {
- uvm_page_physload(fp, lp, fp, lp, freelist);
+ uvm_page_physload(fp, lp, fp, lp, 0);
continue; /* Outside kernel. */
}
@@ -487,11 +485,11 @@ mips_init(int32_t argc, int32_t argv, int32_t envp, int32_t cv,
lp = firstkernpage;
else { /* Need to split! */
uint64_t xp = firstkernpage;
- uvm_page_physload(fp, xp, fp, xp, freelist);
+ uvm_page_physload(fp, xp, fp, xp, 0);
fp = lastkernpage;
}
if (lp > fp) {
- uvm_page_physload(fp, lp, fp, lp, freelist);
+ uvm_page_physload(fp, lp, fp, lp, 0);
}
}