summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-04-09 23:38:31 +0000
committerriastradh <riastradh@NetBSD.org>2022-04-09 23:38:31 +0000
commit1e11a48f28e95996681facbeddec6f993a79e81f (patch)
tree85fcb5573846ef14a6a7336b15db7e84bb502354 /sys/arch/alpha
parent65ce62ef381f3078b9c1af4683e209dd4f696d4a (diff)
sys: Use membar_release/acquire around reference drop.
This just goes through my recent reference count membar audit and changes membar_exit to membar_release and membar_enter to membar_acquire -- this should make everything cheaper on most CPUs without hurting correctness, because membar_acquire is generally cheaper than membar_enter.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/pmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c
index 0a0ad942c76..df6f5892d39 100644
--- a/sys/arch/alpha/alpha/pmap.c
+++ b/sys/arch/alpha/alpha/pmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.306 2022/04/09 23:36:22 riastradh Exp $ */
+/* $NetBSD: pmap.c,v 1.307 2022/04/09 23:38:31 riastradh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.306 2022/04/09 23:36:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.307 2022/04/09 23:38:31 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1659,11 +1659,11 @@ pmap_destroy(pmap_t pmap)
printf("pmap_destroy(%p)\n", pmap);
#endif
- PMAP_MP(membar_exit());
+ PMAP_MP(membar_release());
KASSERT(atomic_load_relaxed(&pmap->pm_count) > 0);
if (atomic_dec_uint_nv(&pmap->pm_count) > 0)
return;
- PMAP_MP(membar_enter());
+ PMAP_MP(membar_acquire());
pt_entry_t *lev1map = pmap_lev1map(pmap);