From 23732c0fe3bf86caedc270910353823901c09298 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 4 Jan 2019 17:14:50 +0000 Subject: [PATCH] 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 --- sys/riscv/riscv/mp_machdep.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c index e38aa64598a3..0cd95fd1f79e 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -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); @@ -253,9 +252,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);