From 8f7f38457f940798c149ae40b73e0d20672812de Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 17 May 2019 17:11:01 +0000 Subject: [PATCH] Free microcode memory later. With lockless DI, pmap_remove() requires operational thread lock, which is initialized at SI_SUB_RUN_QUEUE for thread0. Move it even later where APs are started, the moment after which other boot memory like trampoline stacks is already being freed. Reported by: gtetlow Sponsored by: The FreeBSD Foundation MFC after: 30 days --- sys/x86/x86/ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/ucode.c b/sys/x86/x86/ucode.c index 93f82e37eb6..d8beeed6821 100644 --- a/sys/x86/x86/ucode.c +++ b/sys/x86/x86/ucode.c @@ -260,7 +260,7 @@ ucode_release(void *arg __unused) goto restart; } } -SYSINIT(ucode_release, SI_SUB_KMEM + 1, SI_ORDER_ANY, ucode_release, NULL); +SYSINIT(ucode_release, SI_SUB_SMP + 1, SI_ORDER_ANY, ucode_release, NULL); void ucode_load_ap(int cpu) -- 2.45.0