summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-23 08:56:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-23 08:56:05 +0000
commita6f67f564831b24c5854f2cf6bbfe80eb2017ead (patch)
tree3688306e7da71800c5320f7d71f4f75fa29fcb93 /sys/arch
parent33bd1bc5c7a92450194c6be9ea0e5f22e11bf069 (diff)
4/300 cache really is write through but has a slight bug.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/sparc/cpu.c1
-rw-r--r--sys/arch/sparc/sparc/pmap.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index a445aff07c3..43437db234b 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -188,6 +188,7 @@ cpu_attach(parent, dev, aux)
case SUN4_300:
sprintf(cpu_model, "SUN-4/300 series (%s FPU)", fpuname);
bug = 1;
+ vactype = VAC_WRITETHROUGH;
cacheinfo.c_totalsize = 128*1024;
cacheinfo.c_hwflush = 0;
cacheinfo.c_linesize = 16;
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 5fdda8300ac..38c717eb532 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -2862,7 +2862,8 @@ pmap_changeprot(pm, va, prot, wired)
* the latter check deals with a writethrough cache
* problem on the 4/300
*/
- if (vactype == VAC_WRITEBACK &&
+ if ((vactype==VAC_WRITEBACK ||
+ (vactype==VAC_WRITETHROUGH && cputyp==CPU_SUN4)) &&
(tpte & (PG_U|PG_NC|PG_TYPE)) == (PG_U|PG_OBMEM))
cache_flush_page((int)va);
} else {