Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha alpha: Omit needless membar in pmap_ref...



details:   https://anonhg.NetBSD.org/src/rev/3e1df3adc169
branches:  trunk
changeset: 365149:3e1df3adc169
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Apr 09 23:36:22 2022 +0000

description:
alpha: Omit needless membar in pmap_reference.

If the pmap is published enough for us to obtain a reference to it
then there's no membar needed.  If it's not then something else is
wrong and we can't use pmap_reference here anyway.  Membars are
needed only on the destruction side to make sure all use, by any
thread, happens-before all freeing in the last user thread.

diffstat:

 sys/arch/alpha/alpha/pmap.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 890ede4e6157 -r 3e1df3adc169 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Sat Apr 09 23:35:58 2022 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Sat Apr 09 23:36:22 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.305 2022/03/12 15:32:31 riastradh Exp $ */
+/* $NetBSD: pmap.c,v 1.306 2022/04/09 23:36:22 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.305 2022/03/12 15:32:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.306 2022/04/09 23:36:22 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1706,7 +1706,6 @@
 
        newcount = atomic_inc_uint_nv(&pmap->pm_count);
        KASSERT(newcount != 0);
-       PMAP_MP(membar_enter());
 }
 
 /*



Home | Main Index | Thread Index | Old Index