Author: wma
Date: Thu Jan 18 07:38:54 2018
New Revision: 328110
URL: https://svnweb.freebsd.org/changeset/base/328110

Log:
  KDB: restart only CPUs stopped by KDB
  
  There is a case when not all CPUs went online. In that situation,
  restart only APs which were operational before entering KDB.
  
  Created by:            Wojciech Macek <w...@semihalf.com>
  Obtained from:         Semihalf
  Reviewed by:           nwhitehorn
  Differential revision: https://reviews.freebsd.org/D13949
  Sponsored by:          QCM Technologies

Modified:
  head/sys/kern/subr_kdb.c

Modified: head/sys/kern/subr_kdb.c
==============================================================================
--- head/sys/kern/subr_kdb.c    Thu Jan 18 06:28:21 2018        (r328109)
+++ head/sys/kern/subr_kdb.c    Thu Jan 18 07:38:54 2018        (r328110)
@@ -673,6 +673,7 @@ kdb_trap(int type, int code, struct trapframe *tf)
 #ifdef SMP
        if (!SCHEDULER_STOPPED()) {
                other_cpus = all_cpus;
+               CPU_NAND(&other_cpus, &stopped_cpus);
                CPU_CLR(PCPU_GET(cpuid), &other_cpus);
                stop_cpus_hard(other_cpus);
                did_stop_cpus = 1;
@@ -707,8 +708,9 @@ kdb_trap(int type, int code, struct trapframe *tf)
        kdb_active--;
 
 #ifdef SMP
+       CPU_AND(&other_cpus, &stopped_cpus);
        if (did_stop_cpus)
-               restart_cpus(stopped_cpus);
+               restart_cpus(other_cpus);
 #endif
 
        intr_restore(intr);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to