summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2016-01-05 05:27:55 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2016-01-05 05:27:55 +0000
commit55315d01f17d7e0b2ab2de4746fc933d16906ef1 (patch)
tree04804be73d905d738a676c4f6b67329ce8f96b7b /sys/arch/octeon
parent8b1c4bc659bfea20af1c24aa7f25c10ab14b8163 (diff)
Some implementations of HitSyncDCache() call pmap_extract() for va->pa
conversion. Because pmap_extract() acquires the PTE mutex, a "locking against myself" panic is triggered if the cache routine gets called in a context where the mutex is already held. In the pmap, all calls to HitSyncDCache() are for a whole page. Add a new cache routine, HitSyncDCachePage(), which gets both the va and the pa of a page. This removes the need of the va->pa conversion. The new routine has the same signature as SyncDCachePage(), allowing reuse of the same routine for cache implementations that do not need differences between "Hit" and non-"Hit" routines. With the diff, POWER Indigo2 R8000 boots multiuser again. Tested on sgi GENERIC-IP27.MP and octeon GENERIC.MP, too. Diff from miod@, ok kettenis@
Diffstat (limited to 'sys/arch/octeon')
-rw-r--r--sys/arch/octeon/include/cpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/octeon/include/cpu.h b/sys/arch/octeon/include/cpu.h
index da18f81f9eb..6e6963ba442 100644
--- a/sys/arch/octeon/include/cpu.h
+++ b/sys/arch/octeon/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.6 2014/03/31 20:21:19 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.7 2016/01/05 05:27:54 visa Exp $ */
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -71,6 +71,8 @@ void hw_ipi_intr_clear(u_long);
Octeon_SyncICache((ci))
#define Mips_SyncDCachePage(ci, va, pa) \
Octeon_SyncDCachePage((ci), (va), (pa))
+#define Mips_HitSyncDCachePage(ci, va, pa) \
+ Octeon_SyncDCachePage((ci), (va), (pa))
#define Mips_HitSyncDCache(ci, va, l) \
Octeon_HitSyncDCache((ci), (va), (l))
#define Mips_IOSyncDCache(ci, va, l, h) \