summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/mmu.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-10-02 01:01:34 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-10-02 01:01:34 +0200
commitc0f464b98fde437a1c6556006e87662827d77096 (patch)
treea30558a80f9a8810f43c414d762c95a7ee5dbb52 /sys/src/9/pc/mmu.c
parent0ee738ef8c34d5494265b8a14435333f45b96dc6 (diff)
pc: move low-level allocation details out of mmu.c into memory.c rampage() function
Diffstat (limited to 'sys/src/9/pc/mmu.c')
-rw-r--r--sys/src/9/pc/mmu.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/src/9/pc/mmu.c b/sys/src/9/pc/mmu.c
index c76c8962b..383ba7d91 100644
--- a/sys/src/9/pc/mmu.c
+++ b/sys/src/9/pc/mmu.c
@@ -523,17 +523,9 @@ mmuwalk(ulong* pdb, ulong va, int level, int create)
if(*table & PTESIZE)
panic("mmuwalk2: va %luX entry %luX", va, *table);
if(!(*table & PTEVALID)){
- /*
- * Have to call low-level allocator from
- * memory.c if we haven't set up the xalloc
- * tables yet.
- */
- if(conf.mem[0].npage != 0)
- map = xspanalloc(BY2PG, BY2PG, 0);
- else
- map = rampage();
+ map = rampage();
if(map == nil)
- panic("mmuwalk xspanalloc failed");
+ panic("mmuwalk: page alloc failed");
*table = PADDR(map)|PTEWRITE|PTEVALID;
}
table = KADDR(PPN(*table));