New function: set_segmap_allctx()
This commit is contained in:
parent
1b2cf12fa7
commit
22bcf4e552
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: control.c,v 1.11 1995/06/01 20:44:40 gwr Exp $ */
|
||||
/* $NetBSD: control.c,v 1.12 1995/10/10 21:38:56 gwr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Adam Glass
|
||||
|
@ -79,3 +79,30 @@ void set_segmap(va, sme)
|
|||
{
|
||||
set_control_byte((char *) CONTROL_ADDR_BUILD(SEGMAP_BASE, va), sme);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set a segmap entry in all contexts.
|
||||
* (i.e. somewhere in kernel space.)
|
||||
* XXX - Should optimize: "(get|set)_control_(word|byte)"
|
||||
* calls so this does save/restore of sfc/dfc only once!
|
||||
*/
|
||||
void set_segmap_allctx(va, sme)
|
||||
vm_offset_t va;
|
||||
unsigned char sme; /* segmap entry */
|
||||
{
|
||||
register char ctx, oldctx;
|
||||
|
||||
/* Inline get_context() */
|
||||
oldctx = get_control_byte((char *) CONTEXT_REG);
|
||||
oldctx &= CONTEXT_MASK;
|
||||
|
||||
for (ctx = 0; ctx < NCONTEXT; ctx++) {
|
||||
/* Inlined set_context() */
|
||||
set_control_byte((char *) CONTEXT_REG, ctx);
|
||||
/* Inlined set_segmap() */
|
||||
set_control_byte((char *) CONTROL_ADDR_BUILD(SEGMAP_BASE, va), sme);
|
||||
}
|
||||
|
||||
/* Inlined set_context(ctx); */
|
||||
set_control_byte((char *) CONTEXT_REG, oldctx);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.57 1995/10/08 23:48:22 gwr Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.58 1995/10/10 21:39:04 gwr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Gordon W. Ross
|
||||
|
@ -1855,13 +1855,8 @@ pmap_remove_range_mmu(pmap, sva, eva)
|
|||
|
||||
/* First, remove it from the MMU. */
|
||||
if (kernel_pmap == pmap) {
|
||||
old_ctx = get_context();
|
||||
for (i=0; i < NCONTEXT; i++) { /* map out of all segments */
|
||||
set_context(i);
|
||||
/* Did cache flush above. */
|
||||
set_segmap(sva, SEGINV);
|
||||
}
|
||||
set_context(old_ctx);
|
||||
/* Did cache flush above. */
|
||||
set_segmap_allctx(sva, SEGINV);
|
||||
} else {
|
||||
#ifdef PMAP_DEBUG
|
||||
if (pmap_debug & PMD_SEGMAP) {
|
||||
|
@ -2106,12 +2101,7 @@ pmap_enter_kernel(va, pa, prot, wired, new_pte)
|
|||
if (sme == SEGINV) {
|
||||
pmegp = pmeg_allocate(kernel_pmap, sun3_trunc_seg(va));
|
||||
sme = pmegp->pmeg_index;
|
||||
c = get_context();
|
||||
for (i=0; i < NCONTEXT; i++) { /* map into all contexts */
|
||||
set_context(i);
|
||||
set_segmap(va, sme);
|
||||
}
|
||||
set_context(c);
|
||||
set_segmap_allctx(va, sme);
|
||||
#ifdef PMAP_DEBUG
|
||||
if (pmap_debug & PMD_SEGMAP) {
|
||||
printf("pmap: set_segmap pmap=%x va=%x sme=%x (ek1)\n",
|
||||
|
|
Loading…
Reference in New Issue