CVSROOT:        /cvs
Module name:    src
Changes by:     v...@cvs.openbsd.org    2016/01/04 22:27:54

Modified files:
        sys/arch/loongson/include: cpu.h 
        sys/arch/mips64/include: cache.h cpu.h 
        sys/arch/mips64/mips64: cache_loongson2.c cache_loongson3.c 
                                cache_mips64r2.c cache_octeon.c 
                                cache_r10k.c cache_r4k.c cache_r5k.c 
                                cache_tfp.c pmap.c 
        sys/arch/octeon/include: cpu.h 
        sys/arch/sgi/localbus: tcc.c 

Log message:
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@

Reply via email to