Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Back out the change to swap Lev1map on ...
details: https://anonhg.NetBSD.org/src/rev/e0898d9f51d7
branches: trunk
changeset: 471933:e0898d9f51d7
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Apr 15 21:21:25 1999 +0000
description:
Back out the change to swap Lev1map on MP systems that use the PROM console.
Basically, we have to completely nuke the _PMAP_USES_PROM_CONSOLE code from
orbit before MP is going to properly work.
diffstat:
sys/arch/alpha/alpha/pmap.c | 21 ++-------------------
sys/arch/alpha/alpha/prom.c | 36 ++++--------------------------------
2 files changed, 6 insertions(+), 51 deletions(-)
diffs (142 lines):
diff -r ac12f791b8dd -r e0898d9f51d7 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Thu Apr 15 20:48:49 1999 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Thu Apr 15 21:21:25 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.91 1999/04/11 04:04:05 chs Exp $ */
+/* $NetBSD: pmap.c,v 1.92 1999/04/15 21:21:25 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.91 1999/04/11 04:04:05 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92 1999/04/15 21:21:25 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -808,32 +808,15 @@
#ifdef _PMAP_MAY_USE_PROM_CONSOLE
{
-#if defined(MULTIPROCESSOR)
- extern pt_entry_t *prom_lev1map; /* XXX */
-#else
extern pt_entry_t prom_pte; /* XXX */
-#endif
extern int prom_mapped; /* XXX */
if (pmap_uses_prom_console()) {
/*
* XXX Save old PTE so we can remap the PROM, if
* XXX necessary.
- * XXX
- * XXX On MP systems, the processor using the PROM
- * XXX actually has to switch to another page table
- * XXX so as to avoid stomping on an existing mapping
- * XXX which may be shared with another processor.
*/
-#if defined(MULTIPROCESSOR)
- prom_lev1map = (pt_entry_t *)
- pmap_steal_memory(sizeof(pt_entry_t) * NPTEPG, NULL, NULL);
- memcpy(prom_lev1map, kernel_lev1map,
- sizeof(pt_entry_t) * NPTEPG);
- prom_lev1map[0] = *(pt_entry_t *)ptaddr & ~PG_ASM;
-#else
prom_pte = *(pt_entry_t *)ptaddr & ~PG_ASM;
-#endif
}
prom_mapped = 0;
diff -r ac12f791b8dd -r e0898d9f51d7 sys/arch/alpha/alpha/prom.c
--- a/sys/arch/alpha/alpha/prom.c Thu Apr 15 20:48:49 1999 +0000
+++ b/sys/arch/alpha/alpha/prom.c Thu Apr 15 21:21:25 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: prom.c,v 1.35 1999/02/26 03:59:14 thorpej Exp $ */
+/* $NetBSD: prom.c,v 1.36 1999/04/15 21:21:25 thorpej Exp $ */
/*
* Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University
@@ -27,7 +27,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.35 1999/02/26 03:59:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.36 1999/04/15 21:21:25 thorpej Exp $");
#include "opt_multiprocessor.h"
@@ -61,25 +61,6 @@
#ifdef _PMAP_MAY_USE_PROM_CONSOLE
int prom_mapped = 1; /* Is PROM still mapped? */
-#if defined(MULTIPROCESSOR)
-pt_entry_t *prom_lev1map, *saved_lev1map;
-static pt_entry_t *prom_swaplev1map __P((pt_entry_t *));
-
-static pt_entry_t *
-prom_swaplev1map(l1map)
- pt_entry_t *l1map;
-{
- struct alpha_pcb *apcb;
- pt_entry_t *rl1map;
-
- apcb = (struct alpha_pcb *)ALPHA_PHYS_TO_K0SEG(curpcb);
-
- rl1map = (pt_entry_t *)ALPHA_PHYS_TO_K0SEG(apcb->apcb_ptbr << PGSHIFT);
- apcb->apcb_ptbr = ALPHA_K0SEG_TO_PHYS((vaddr_t)l1map) >> PGSHIFT;
- (void) alpha_pal_swpctx(curpcb);
- return (rl1map);
-}
-#else /* ! MULTIPROCESSOR */
pt_entry_t prom_pte, saved_pte[1]; /* XXX */
static pt_entry_t *prom_lev1map __P((void));
@@ -95,7 +76,6 @@
return ((pt_entry_t *)ALPHA_PHYS_TO_K0SEG(apcb->apcb_ptbr << PGSHIFT));
}
-#endif /* MULTIPROCESSOR */
#endif /* _PMAP_MAY_USE_PROM_CONSOLE */
void
@@ -147,9 +127,6 @@
if (prom_mapped == 0 && curpcb != 0) {
if (!pmap_uses_prom_console())
panic("prom_enter");
-#if defined(MULTIPROCESSOR)
- saved_lev1map = prom_swaplev1map(prom_lev1map);
-#else
{
pt_entry_t *lev1map;
@@ -157,8 +134,7 @@
saved_pte[0] = lev1map[0]; /* XXX */
lev1map[0] = prom_pte; /* XXX */
}
-#endif
- prom_cache_sync(); /* XXX */
+ prom_cache_sync(); /* XXX */
}
#endif
return s;
@@ -176,17 +152,13 @@
if (prom_mapped == 0 && curpcb != 0) {
if (!pmap_uses_prom_console())
panic("prom_leave");
-#if defined(MULTIPROCESSOR)
- (void) prom_swaplev1map(saved_lev1map);
-#else
{
pt_entry_t *lev1map;
lev1map = prom_lev1map(); /* XXX */
lev1map[0] = saved_pte[0]; /* XXX */
}
-#endif
- prom_cache_sync(); /* XXX */
+ prom_cache_sync(); /* XXX */
}
#endif
simple_unlock(&prom_slock);
Home |
Main Index |
Thread Index |
Old Index