summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2000-12-01 18:55:58 +0000
committergallatin <gallatin@FreeBSD.org>2000-12-01 18:55:58 +0000
commitd874e25bc3a667ef05fd6d74a3aff0a913b16fa2 (patch)
treea0b956185e4b2aabfaebdc5392b18657ce77d0bb /sys/powerpc/aim
parent47bc202c6da06d5363b81ebc162c4bff623a24ec (diff)
downloadFreeBSD-src-d874e25bc3a667ef05fd6d74a3aff0a913b16fa2.zip
FreeBSD-src-d874e25bc3a667ef05fd6d74a3aff0a913b16fa2.tar.gz
acquire/release Giant in vm_page_zero_idle(), like on i386
Discused with: jhb
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r--sys/powerpc/aim/vm_machdep.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index 1f1a7f2..ba5004d 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -425,9 +425,7 @@ vm_page_zero_idle()
if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count))
return(0);
-#ifdef SMP
- if (KLOCK_ENTER(M_TRY)) {
-#endif
+ if (mtx_try_enter(&Giant, MTX_DEF)) {
s = splvm();
m = vm_page_list_find(PQ_FREE, free_rover, FALSE);
zero_state = 0;
@@ -456,13 +454,9 @@ vm_page_zero_idle()
}
free_rover = (free_rover + PQ_PRIME2) & PQ_L2_MASK;
splx(s);
-#ifdef SMP
- KLOCK_EXIT;
-#endif
+ mtx_exit(&Giant, MTX_DEF);
return (1);
-#ifdef SMP
}
-#endif
return (0);
}
OpenPOWER on IntegriCloud