Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm uvm: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.



details:   https://anonhg.NetBSD.org/src/rev/bd17a01ad6e6
branches:  trunk
changeset: 373682:bd17a01ad6e6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Feb 24 11:03:13 2023 +0000

description:
uvm: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html

diffstat:

 sys/uvm/uvm_aobj.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r ad91d79f48b1 -r bd17a01ad6e6 sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c        Fri Feb 24 11:03:01 2023 +0000
+++ b/sys/uvm/uvm_aobj.c        Fri Feb 24 11:03:13 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_aobj.c,v 1.156 2022/05/31 08:43:16 andvar Exp $    */
+/*     $NetBSD: uvm_aobj.c,v 1.157 2023/02/24 11:03:13 riastradh Exp $ */
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.156 2022/05/31 08:43:16 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.157 2023/02/24 11:03:13 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -604,16 +604,12 @@
        KASSERT(uobj->uo_refs > 0);
        UVMHIST_LOG(maphist,"  (uobj=%#jx)  ref=%jd",
            (uintptr_t)uobj, uobj->uo_refs, 0, 0);
-#ifndef __HAVE_ATOMIC_AS_MEMBAR
        membar_release();
-#endif
        if (atomic_dec_uint_nv(&uobj->uo_refs) > 0) {
                UVMHIST_LOG(maphist, "<- done (rc>0)", 0,0,0,0);
                return;
        }
-#ifndef __HAVE_ATOMIC_AS_MEMBAR
        membar_acquire();
-#endif
 
        /*
         * Remove the aobj from the global list.



Home | Main Index | Thread Index | Old Index