From nobody Wed Sep 13 15:47:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rm4bf4lgcz4t44q; Wed, 13 Sep 2023 15:47:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rm4bf3B8mz3STL; Wed, 13 Sep 2023 15:47:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694620078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcWZ9MQUSD9J2wUyVB+mpX425v1iqmq0UFsiRx/dXHs=; b=R/qLpM9DEFopydOnJsIeBv/zrPAce6hyAkntbqp0DxShhR5KVJIsCtK/kq6W4ZGS6yrP1x Cn9YeLLY3J36AYAyYK7nu6DDFHNPW2qndPQrnd1np6jMsSSWvzQwL2EPkD1LE6ZYInrcV+ 4w9RZsYOCww5mq86GJssfEL47EEVA7Z1ZijUuOO2jLNMxG9mO+k62IoUaYxh9poFDQzmaH 5m26NcvYP+o5QsgcNX7g7DnjluivSFRj/JusnGlGXz6+9kZYSsmCNTobeF3+B7NpvPbj2E FTWM8+QxNCsQH7UqwVT+V63WjWHuSzStld2qk+lQNPsWn7NPcxrtyWMH+28www== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694620078; a=rsa-sha256; cv=none; b=bq+pX5rJCCZMev+D+GA2eA/rMYLcE+ZKOqnQf+qPn0O7HUtdLiYnBRsnweiBXQcCnugPAC 03xJCPonY5i2M25iiU6P1Chkny0Yu8RHJYymdyZtFnjtkqYtRixNykS9bDk8+b9eNWp0Xv CoY+3TNke0f9AoO9/tiLmuPN9OVkhaPWRlpjTLtdfyURO/ruQ6liDOnaVwSZ3AB6anwHOD 20TVd0XO/BHUjLbqjm21K1EP3bg7SKggJHlZCx9jBMm2VRBA4MIeP4c3DSMEYlUT0gm1/6 ZYk4/evKlhtrXK2myQBa/lPUOPwNkIFEWmKm7qXky5W3Mn9PxsQcU2jC28ZbmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694620078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcWZ9MQUSD9J2wUyVB+mpX425v1iqmq0UFsiRx/dXHs=; b=R2sH2vDZKdsj8ZcVRwx4cJTc2SfRHHdVO9jObLZ8qbXIKzKHRbsW7oUwK9LEzbJBbDHBSk DYz0kKC09D11kVuOOnNt0gfNlB5/onO+foUpxnixHPVPss1HSmfStXbSLoYZ4WNsr1H2bB z6tEIvdBvm5s9xh2QKwDYjX6c2Y5oeSg9K2fmG5qaXPwvk/NL65lPeKzmGwek4XS5CZMYu zKp90LW1s78KLYWIF8LveauR0cW0fNk52oO3Y7a00FKN0MePsycxMpu9PjJ3VpFPj/END5 8aYHbTYTvGoxXUjsjMBZKC4+NWhNTMDZP5vZOnPKG2+W/LoBbnw2/7+6ZQ+mPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rm4bf25Fkz4Rs; Wed, 13 Sep 2023 15:47:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38DFlwoA065691; Wed, 13 Sep 2023 15:47:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38DFlwhk065688; Wed, 13 Sep 2023 15:47:58 GMT (envelope-from git) Date: Wed, 13 Sep 2023 15:47:58 GMT Message-Id: <202309131547.38DFlwhk065688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: c31f2b5e6b59 - stable/14 - init_main: Record completed SYSINITs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c31f2b5e6b591c61711018c3d6e52067ae860e9c Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=c31f2b5e6b591c61711018c3d6e52067ae860e9c commit c31f2b5e6b591c61711018c3d6e52067ae860e9c Author: Colin Percival AuthorDate: 2023-09-05 23:47:57 +0000 Commit: Colin Percival CommitDate: 2023-09-13 15:47:36 +0000 init_main: Record completed SYSINITs When removing them from sysinit_list, append them to sysinit_done_list; print this list from 'show sysinit' along with the list of future sysinits. Reviewed by: jhb, gallatin (previous version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41749 (cherry picked from commit 1926d5cef6eaa1302024d6471271c930ad65f9b2) --- sys/kern/init_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index a6b327339c80..a8df9f84a29a 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -163,9 +163,11 @@ SYSINIT(placeholder, SI_SUB_DUMMY, SI_ORDER_ANY, NULL, NULL); SET_DECLARE(sysinit_set, struct sysinit); /* - * The sysinit list itself. Items are removed as they are run. + * The sysinit lists. Items are moved to sysinit_done_list when done. */ static STAILQ_HEAD(sysinitlist, sysinit) sysinit_list; +static struct sysinitlist sysinit_done_list = + STAILQ_HEAD_INITIALIZER(sysinit_done_list); /* * Compare two sysinits; return -1, 0, or 1 if a comes before, at the same time @@ -289,6 +291,7 @@ mi_startup(void) */ while ((sip = STAILQ_FIRST(&sysinit_list)) != NULL) { STAILQ_REMOVE_HEAD(&sysinit_list, next); + STAILQ_INSERT_TAIL(&sysinit_done_list, sip, next); if (sip->subsystem == SI_SUB_DUMMY) continue; /* skip dummy task(s)*/ @@ -904,6 +907,11 @@ DB_SHOW_COMMAND_FLAGS(sysinit, db_show_sysinit, DB_CMD_MEMSAFE) db_printf("SYSINIT vs Name(Ptr)\n"); db_printf(" Subsystem Order\n"); db_printf(" Function(Name)(Arg)\n"); + STAILQ_FOREACH(sip, &sysinit_done_list, next) { + db_show_print_syinit(sip, true); + if (db_pager_quit) + return; + } STAILQ_FOREACH(sip, &sysinit_list, next) { db_show_print_syinit(sip, true); if (db_pager_quit)