Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips No need for cpu_hatch_lock after all sinc...



details:   https://anonhg.NetBSD.org/src/rev/eaf7676c2a38
branches:  trunk
changeset: 1012051:eaf7676c2a38
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Jul 20 14:59:57 2020 +0000

description:
No need for cpu_hatch_lock after all since we hatch secondaries one at a time

diffstat:

 sys/arch/mips/mips/cpu_subr.c |  10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diffs (46 lines):

diff -r b7f8f546a693 -r eaf7676c2a38 sys/arch/mips/mips/cpu_subr.c
--- a/sys/arch/mips/mips/cpu_subr.c     Mon Jul 20 14:50:41 2020 +0000
+++ b/sys/arch/mips/mips/cpu_subr.c     Mon Jul 20 14:59:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_subr.c,v 1.54 2020/07/20 14:38:38 skrll Exp $      */
+/*     $NetBSD: cpu_subr.c,v 1.55 2020/07/20 14:59:57 jmcneill Exp $   */
 
 /*-
  * Copyright (c) 2010, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.54 2020/07/20 14:38:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.55 2020/07/20 14:59:57 jmcneill Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -106,8 +106,6 @@
 };
 
 #ifdef MULTIPROCESSOR
-static kmutex_t cpu_hatch_lock;
-
 struct cpu_info * cpuid_infos[MAXCPUS] = {
        [0] = &cpu_info_store,
 };
@@ -951,9 +949,7 @@
         * Let this CPU do its own post-running initialization
         * (for things that have to be done on the local CPU).
         */
-       mutex_enter(&cpu_hatch_lock);
        (*mips_locoresw.lsw_cpu_run)(ci);
-       mutex_exit(&cpu_hatch_lock);
 
        /*
         * Now turn on interrupts (and verify they are on).
@@ -977,8 +973,6 @@
        CPU_INFO_ITERATOR cii;
        struct cpu_info *ci;
 
-       mutex_init(&cpu_hatch_lock, MUTEX_DEFAULT, IPL_HIGH);
-
        for (CPU_INFO_FOREACH(cii, ci)) {
                if (CPU_IS_PRIMARY(ci))
                        continue;



Home | Main Index | Thread Index | Old Index