From b92b419a6a8ef401c8a4e022115bf3e18426eea0 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Sun, 1 Mar 1998 00:38:26 +0000 Subject: Merge of MACHINE_NEW_CONTIG (aka MNN) code from Chuck Cranor, . This code is as of yet disabled on all platforms, actually not yet supported on more than mvme68k, although other platforms are expected soon, as code is already available. This code makes handling of multiple physical memory regions consistent over all platforms, as well as keeping the performance of maintaining a single continuous memory chunk. It is also a requirement for the upcoming UVM replacement VM system. What I did in this merge: just declared the pmap_map function in a MD include file per port that needs it. It's not an exported pmap interface, says Chuck. It ended up in differnt include files on differnet ports, as I tried to follow the current policy on a per-arch basis. --- sys/arch/arc/arc/pmap.c | 14 ++++++++------ sys/arch/arc/arc/vm_machdep.c | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'sys/arch/arc') diff --git a/sys/arch/arc/arc/pmap.c b/sys/arch/arc/arc/pmap.c index c83071a9350..139ca419e5d 100644 --- a/sys/arch/arc/arc/pmap.c +++ b/sys/arch/arc/arc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.11 1997/08/01 23:33:05 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.12 1998/03/01 00:37:24 niklas Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 8.4 (Berkeley) 1/26/94 - * $Id: pmap.c,v 1.11 1997/08/01 23:33:05 deraadt Exp $ + * $Id: pmap.c,v 1.12 1998/03/01 00:37:24 niklas Exp $ */ /* @@ -487,8 +487,9 @@ pmap_pinit(pmap) do { mem = vm_page_alloc1(); if (mem == NULL) { - VM_WAIT; /* XXX What else can we do */ - } /* XXX Deadlock situations? */ + /* XXX What else can we do? Deadlocks? */ + vm_wait("ppinit"); + } } while (mem == NULL); /* Do zero via cached if No L2 or Snooping L2 */ @@ -1213,8 +1214,9 @@ pmap_enter(pmap, va, pa, prot, wired) do { mem = vm_page_alloc1(); if (mem == NULL) { - VM_WAIT; /* XXX What else can we do */ - } /* XXX Deadlock situations? */ + /* XXX What else can we do? Deadlocks? */ + vm_wait("penter"); + } } while (mem == NULL); /* Do zero via cached if No L2 or Snooping L2 */ diff --git a/sys/arch/arc/arc/vm_machdep.c b/sys/arch/arc/arc/vm_machdep.c index 247d27630a7..b3db107794a 100644 --- a/sys/arch/arc/arc/vm_machdep.c +++ b/sys/arch/arc/arc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.7 1998/01/28 13:46:00 pefo Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.8 1998/03/01 00:37:25 niklas Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -39,7 +39,7 @@ * from: Utah Hdr: vm_machdep.c 1.21 91/04/06 * * from: @(#)vm_machdep.c 8.3 (Berkeley) 1/4/94 - * $Id: vm_machdep.c,v 1.7 1998/01/28 13:46:00 pefo Exp $ + * $Id: vm_machdep.c,v 1.8 1998/03/01 00:37:25 niklas Exp $ */ #include @@ -509,7 +509,7 @@ kmem_alloc_wait_align(map, size, align) } assert_wait(map, TRUE); vm_map_unlock(map); - thread_block(); + thread_block("kmawa"); } vm_map_insert(map, NULL, (vm_offset_t)0, addr, addr + size); vm_map_unlock(map); -- cgit v1.2.3