From 55315d01f17d7e0b2ab2de4746fc933d16906ef1 Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Tue, 5 Jan 2016 05:27:55 +0000 Subject: 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@ --- sys/arch/octeon/include/cpu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch/octeon') 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) \ -- cgit v1.2.3