summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-09-20 11:50:06 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-09-20 11:50:06 +0000
commit70ac89c5f1c2808e93c1be02074e31a9f7c76ba4 (patch)
tree9c42df94167615d16cc8cc9bc859048a4d6ddbb5 /sys
parent278deaf45bc6d79b8b18d0f33b0c7a4655372775 (diff)
Reset the `pending I$ flushes' flag in tfp_InvalidateICache() if invalidating
the whole I$.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mips64/mips64/cache_tfp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/cache_tfp.c b/sys/arch/mips64/mips64/cache_tfp.c
index 06b9e312f59..896c33ce5f7 100644
--- a/sys/arch/mips64/mips64/cache_tfp.c
+++ b/sys/arch/mips64/mips64/cache_tfp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cache_tfp.c,v 1.4 2014/03/31 20:21:19 miod Exp $ */
+/* $OpenBSD: cache_tfp.c,v 1.5 2015/09/20 11:50:05 miod Exp $ */
/*
* Copyright (c) 2012 Miodrag Vallat.
@@ -66,9 +66,9 @@ tfp_ConfigCache(struct cpu_info *ci)
ci->ci_l1data.linesize = 16;
#else
ci->ci_l1inst.size = 16384;
- ci->ci_l1inst.linesize = 32;
+ ci->ci_l1inst.linesize = TFP_DCTW_STEP; /* but handled in 32b chunks */
ci->ci_l1data.size = 16384;
- ci->ci_l1data.linesize = 32;
+ ci->ci_l1data.linesize = TFP_DCTW_STEP;
#endif
/* R8000 L1 caches are direct */
@@ -80,6 +80,10 @@ tfp_ConfigCache(struct cpu_info *ci)
cache_valias_mask =
(max(ci->ci_l1inst.size, ci->ci_l1data.size) - 1) &
~PAGE_MASK;
+#ifdef DIAGNOSTIC
+ if (cache_valias_mask != 0)
+ panic("page size is too small");
+#endif
/* R8000 L2 cache are platform-specific, and not covered here */
memset(&ci->ci_l2, 0, sizeof(struct cache_info));
@@ -125,6 +129,7 @@ tfp_InvalidateICache(struct cpu_info *ci, vaddr_t _va, size_t _sz)
if (_sz >= ci->ci_l1inst.size) {
tfp_inval_icache(ci->ci_l1inst.size);
+ ci->ci_cachepending_l1i = 0;
} else {
/* extend the range to multiple of 32 bytes */
va = _va & ~(32UL - 1);