summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-12-07 10:39:48 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-12-07 10:39:48 +0000
commit0c046f3f5f01e0c0689082661fa39b2bad7160c4 (patch)
tree2f1e815baf733d517480e28eb9a41cdb1902d78d
parent18e64f54f2cd8939283942e3333c429131c704b2 (diff)
Zap pmap_alloc_cpu. this is not how we want to do this.
-rw-r--r--sys/arch/sparc/sparc/cpuvar.h3
-rw-r--r--sys/arch/sparc/sparc/pmap.c62
2 files changed, 2 insertions, 63 deletions
diff --git a/sys/arch/sparc/sparc/cpuvar.h b/sys/arch/sparc/sparc/cpuvar.h
index 003a745ed0b..45acc703a3e 100644
--- a/sys/arch/sparc/sparc/cpuvar.h
+++ b/sys/arch/sparc/sparc/cpuvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpuvar.h,v 1.5 2001/12/05 14:40:48 art Exp $ */
+/* $OpenBSD: cpuvar.h,v 1.6 2001/12/07 10:39:47 art Exp $ */
/* $NetBSD: cpuvar.h,v 1.4 1997/07/06 21:14:25 pk Exp $ */
/*
@@ -283,7 +283,6 @@ struct cpu_softc {
*/
void getcpuinfo __P((struct cpu_softc *sc, int node));
void mmu_install_tables __P((struct cpu_softc *));
-void pmap_alloc_cpu __P((struct cpu_softc *));
#define cpuinfo (*(struct cpu_softc *)CPUINFO_VA)
#endif /* _SPARC_CPUVAR_H */
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 4ff31f16ad0..dc39f219c12 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.102 2001/12/07 10:38:11 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.103 2001/12/07 10:39:46 art Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -3292,66 +3292,6 @@ mmu_install_tables(sc)
#endif
}
-/*
- * Allocate per-CPU page tables.
- * Note: this routine is called in the context of the boot CPU
- * during autoconfig.
- */
-void
-pmap_alloc_cpu(sc)
- struct cpu_softc *sc;
-{
- caddr_t cpustore;
- int *ctxtable;
- int *regtable;
- int *segtable;
- int *pagtable;
- int vr, vs, vpg;
- struct regmap *rp;
- struct segmap *sp;
-
- /* Allocate properly aligned and physically contiguous memory here */
- cpustore = 0;
- ctxtable = 0;
- regtable = 0;
- segtable = 0;
- pagtable = 0;
-
- vr = VA_VREG(CPUINFO_VA);
- vs = VA_VSEG(CPUINFO_VA);
- vpg = VA_VPG(CPUINFO_VA);
- rp = &pmap_kernel()->pm_regmap[vr];
- sp = &rp->rg_segmap[vs];
-
- /*
- * Copy page tables, then modify entry for CPUINFO_VA so that
- * it points at the per-CPU pages.
- */
- bcopy(cpuinfo.L1_ptps, regtable, SRMMU_L1SIZE * sizeof(int));
- regtable[vr] =
- (VA2PA((caddr_t)segtable) >> SRMMU_PPNPASHIFT) | SRMMU_TEPTD;
-
- bcopy(rp->rg_seg_ptps, segtable, SRMMU_L2SIZE * sizeof(int));
- segtable[vs] =
- (VA2PA((caddr_t)pagtable) >> SRMMU_PPNPASHIFT) | SRMMU_TEPTD;
-
- bcopy(sp->sg_pte, pagtable, SRMMU_L3SIZE * sizeof(int));
- pagtable[vpg] =
- (VA2PA((caddr_t)cpustore) >> SRMMU_PPNPASHIFT) |
- (SRMMU_TEPTE | PPROT_RWX_RWX | SRMMU_PG_C);
-
- /* Install L1 table in context 0 */
- ctxtable[0] = ((u_int)regtable >> SRMMU_PPNPASHIFT) | SRMMU_TEPTD;
-
- sc->ctx_tbl = ctxtable;
- sc->L1_ptps = regtable;
-
-#if 0
- if ((sc->flags & CPUFLG_CACHEPAGETABLES) == 0) {
- kvm_uncache((caddr_t)0, 1);
- }
-#endif
-}
#endif /* defined sun4m */