svn commit: r342766 - head/sys/riscv/riscv

Mark Johnston markj at FreeBSD.org
Fri Jan 4 17:14:51 UTC 2019


Author: markj
Date: Fri Jan  4 17:14:50 2019
New Revision: 342766
URL: https://svnweb.freebsd.org/changeset/base/342766

Log:
  Don't enable interrupts in init_secondary().
  
  The MI kernel assumes that interrupts will not be enabled on APs until
  after the first context switch.  In particular, the problem was causing
  occasional deadlocks during boot.
  
  Remove an unneeded intr_disable() added in r335005.
  
  Reviewed by:	jhb (previous version)
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D18738

Modified:
  head/sys/riscv/riscv/mp_machdep.c

Modified: head/sys/riscv/riscv/mp_machdep.c
==============================================================================
--- head/sys/riscv/riscv/mp_machdep.c	Fri Jan  4 17:10:16 2019	(r342765)
+++ head/sys/riscv/riscv/mp_machdep.c	Fri Jan  4 17:14:50 2019	(r342766)
@@ -227,7 +227,6 @@ init_secondary(uint64_t cpu)
 	__asm __volatile("mv gp, %0" :: "r"(pcpup));
 
 	/* Workaround: make sure wfi doesn't halt the hart */
-	intr_disable();
 	csr_set(sie, SIE_SSIE);
 	csr_set(sip, SIE_SSIE);
 
@@ -252,9 +251,6 @@ init_secondary(uint64_t cpu)
 
 	/* Start per-CPU event timers. */
 	cpu_initclocks_ap();
-
-	/* Enable interrupts */
-	intr_enable();
 
 	/* Enable external (PLIC) interrupts */
 	csr_set(sie, SIE_SEIE);


More information about the svn-src-all mailing list