diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2016-01-05 05:27:55 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2016-01-05 05:27:55 +0000 |
commit | 55315d01f17d7e0b2ab2de4746fc933d16906ef1 (patch) | |
tree | 04804be73d905d738a676c4f6b67329ce8f96b7b /sys/arch/sgi/localbus | |
parent | 8b1c4bc659bfea20af1c24aa7f25c10ab14b8163 (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/sgi/localbus')
-rw-r--r-- | sys/arch/sgi/localbus/tcc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sgi/localbus/tcc.c b/sys/arch/sgi/localbus/tcc.c index 9ac1155a64d..133f30c687d 100644 --- a/sys/arch/sgi/localbus/tcc.c +++ b/sys/arch/sgi/localbus/tcc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcc.c,v 1.8 2015/12/23 11:45:24 visa Exp $ */ +/* $OpenBSD: tcc.c,v 1.9 2016/01/05 05:27:54 visa Exp $ */ /* * Copyright (c) 2012 Miodrag Vallat. @@ -163,6 +163,7 @@ tcc_ConfigCache(struct cpu_info *ci) ci->ci_SyncCache = tcc_SyncCache; ci->ci_SyncDCachePage = tcc_SyncDCachePage; + ci->ci_HitSyncDCachePage = tcc_SyncDCachePage; ci->ci_HitSyncDCache = tcc_HitSyncDCache; ci->ci_HitInvalidateDCache = tcc_HitInvalidateDCache; ci->ci_IOSyncDCache = tcc_IOSyncDCache; |