summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_witness.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-02-06 04:30:26 +0000
committerjhb <jhb@FreeBSD.org>2002-02-06 04:30:26 +0000
commit156f4c8aea9e9bcea4428c6da79367baa11f3588 (patch)
tree2d0f06748a7a9932a6c9c09800474f8c9daa8d46 /sys/kern/subr_witness.c
parentd2767dc7230887ad0d270b0a72649dcf486932a8 (diff)
downloadFreeBSD-src-156f4c8aea9e9bcea4428c6da79367baa11f3588.zip
FreeBSD-src-156f4c8aea9e9bcea4428c6da79367baa11f3588.tar.gz
Fixes for alpha pmap on SMP machines:
- Create a private list of active pmaps rather than abusing the list of all processes when we need to look up pmaps. The process list needs a sx lock and we can't be getting sx locks in the middle of cpu_switch() (pmap_activate() can call pmap_get_asn() from cpu_switch()). Instead, we protect the list with a spinlock. This also means the list is shorter since a pmap can be used by more than one process and we could (at least in thoery) dink with pmap's more than once, but now we only touch each pmap once when we have to update all of them. - Wrap pmap_activate()'s code to get a new ASN in an explicit critical section so that when it is called while doing an exec() we can't get preempted. - Replace splhigh() in pmap_growkernel() with a critical section to prevent preemption while we are adjusting the kernel page tables. - Fixes abuse of PCPU_GET(), which doesn't return an L-value. - Also adds some slight cleanups to the ASN handling by adding some macros instead of magic numbers in relation to the ASN and ASN generations. Reviewed by: dfr
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r--sys/kern/subr_witness.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index 37dc369..a78c789 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -215,6 +215,7 @@ static struct witness_order_list_entry order_lists[] = {
/*
* leaf locks
*/
+ { "allpmaps", &lock_class_mtx_spin },
{ "icu", &lock_class_mtx_spin },
#ifdef SMP
{ "smp rendezvous", &lock_class_mtx_spin },
OpenPOWER on IntegriCloud