Module Name: src Committed By: riastradh Date: Sat Aug 5 08:05:58 UTC 2023
Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: rump: Set mp_online = true and start threads _after_ cold = 0. Otherwise we may have threads running while cold, which is a contradiction in terms. Deferring mp_online = true is necessary because things like xcall(9) use rely on it to decide whether to wait for threads on other CPUs. To generate a diff of this commit: cvs rdiff -u -r1.355 -r1.356 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.355 src/sys/rump/librump/rumpkern/rump.c:1.356 --- src/sys/rump/librump/rumpkern/rump.c:1.355 Mon Mar 28 20:49:32 2022 +++ src/sys/rump/librump/rumpkern/rump.c Sat Aug 5 08:05:57 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.355 2022/03/28 20:49:32 christos Exp $ */ +/* $NetBSD: rump.c,v 1.356 2023/08/05 08:05:57 riastradh Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.355 2022/03/28 20:49:32 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.356 2023/08/05 08:05:57 riastradh Exp $"); #include <sys/systm.h> #define ELFSIZE ARCH_ELFSIZE @@ -391,14 +391,9 @@ rump_init_callback(void (*cpuinit_callba cprng_init(); cprng_fast_init(); - mp_online = true; - if (cpuinit_callback) (*cpuinit_callback)(); - /* CPUs are up. allow kernel threads to run */ - rump_thread_allow(NULL); - rnd_init_softint(); kqueue_init(); @@ -452,6 +447,11 @@ rump_init_callback(void (*cpuinit_callba cold = 0; + mp_online = true; + + /* CPUs are up. allow kernel threads to run */ + rump_thread_allow(NULL); + sysctl_finalize(); module_init_class(MODULE_CLASS_ANY);