diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-05-02 22:01:48 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-05-02 22:01:48 +0000 |
commit | cd1ab31ea8de29fbe1aedad865b3dd09dfad134e (patch) | |
tree | 8628232a94cba95328b1acf6513ca48429e61b3f /sys/arch/m88k | |
parent | 5833cbf03dce94628ed0be9936c20981ec523b80 (diff) |
Precompute the userland process apr cache bits into a global variable.
On AViiON systems with the 6:1 CMMU:CPU configuration, force cached
mappings to be writethrough - this probably hides a bug in the code, but
that's the only way so far to get such a system running stably.
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r-- | sys/arch/m88k/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/pmap.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/arch/m88k/include/pmap.h b/sys/arch/m88k/include/pmap.h index 7561a9a5e78..f3a2b82e812 100644 --- a/sys/arch/m88k/include/pmap.h +++ b/sys/arch/m88k/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.14 2009/05/02 14:32:27 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.15 2010/05/02 22:01:46 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1991 Carnegie Mellon University @@ -48,6 +48,7 @@ typedef struct pv_entry *pv_entry_t; extern pmap_t kernel_pmap; extern struct pmap kernel_pmap_store; extern caddr_t vmmap; +extern apr_t default_apr; #define pmap_kernel() (&kernel_pmap_store) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c index 4a90268a8d4..9d630d456d1 100644 --- a/sys/arch/m88k/m88k/pmap.c +++ b/sys/arch/m88k/m88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.49 2009/09/27 19:16:10 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.50 2010/05/02 22:01:47 miod Exp $ */ /* * Copyright (c) 2001-2004, Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -115,6 +115,8 @@ pt_entry_t *vmpte, *msgbufmap; struct pmap kernel_pmap_store; pmap_t kernel_pmap = &kernel_pmap_store; +apr_t default_apr = CACHE_GLOBAL | APR_V; + typedef struct kpdt_entry *kpdt_entry_t; struct kpdt_entry { kpdt_entry_t next; @@ -751,12 +753,12 @@ pmap_bootstrap(vaddr_t load_start) * Switch to using new page tables */ - kernel_pmap->pm_apr = (atop((paddr_t)kmap) << PG_SHIFT) | - CACHE_GLOBAL | CACHE_WT | APR_V; #if !defined(MULTIPROCESSOR) && defined(M88110) if (CPU_IS88110) - kernel_pmap->pm_apr &= ~CACHE_GLOBAL; + default_apr &= ~CACHE_GLOBAL; #endif + kernel_pmap->pm_apr = (atop((paddr_t)kmap) << PG_SHIFT) | default_apr | + CACHE_WT; pmap_bootstrap_cpu(cpu_number()); } @@ -894,7 +896,7 @@ pmap_create(void) if (pmap_extract(kernel_pmap, (vaddr_t)segdt, (paddr_t *)&stpa) == FALSE) panic("pmap_create: pmap_extract failed!"); - pmap->pm_apr = (atop(stpa) << PG_SHIFT) | CACHE_GLOBAL | APR_V; + pmap->pm_apr = (atop(stpa) << PG_SHIFT) | default_apr; #if !defined(MULTIPROCESSOR) && defined(M88110) if (CPU_IS88110) pmap->pm_apr &= ~CACHE_GLOBAL; |