shithub: riscv

Download patch

ref: 665b78da231f568f530c329bc9305f9bf050a2de
parent: 80fdafd1d6bc27d7a94fabc12f4af37285a17338
parent: 9e2344a5be97b416c73c81f01913702fd6d2da6c
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Apr 5 21:31:35 EDT 2020

merge

--- a/sys/src/9/pc/mmu.c
+++ b/sys/src/9/pc/mmu.c
@@ -524,8 +524,7 @@
 			panic("mmuwalk2: va %luX entry %luX", va, *table);
 		if(!(*table & PTEVALID)){
 			map = rampage();
-			if(map == nil)
-				panic("mmuwalk: page alloc failed");
+			memset(map, 0, BY2PG);
 			*table = PADDR(map)|PTEWRITE|PTEVALID;
 		}
 		table = KADDR(PPN(*table));
--- a/sys/src/9/pc64/mmu.c
+++ b/sys/src/9/pc64/mmu.c
@@ -299,8 +299,6 @@
 	if(pte == nil || (*pte & PTESIZE) == 0 || (va & PGLSZ(1)-1) == 0)
 		return;
 	table = rampage();
-	if(table == nil)
-		panic("ptesplit: out of memory\n");
 	va &= -PGLSZ(1);
 	pa = *pte & ~PTESIZE;
 	for(off = 0; off < PGLSZ(1); off += PGLSZ(0))