From nobody Wed Sep 13 20:03:46 2023 X-Original-To: dev-commits-src-branches@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 4RmBGp5dbRz4tGG3; Wed, 13 Sep 2023 20:03:46 +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 4RmBGp4fBxz3NF2; Wed, 13 Sep 2023 20:03:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694635426; 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=sxBlE8Iax24SBH0Wc5qbkcNtBSqeRXL3xTiZqbzaN8M=; b=U08M6fThj/Eig5+7zwvcSgU4v6D0YNo7KJCVgibdpjNkr+PMvEE7SYbPQC4PpNQVzRXfSP 9ThmerNWihshgTzi8LVXdhbRUrTpToau11oDJn+mK/y9t2jebEkelxyOQ37qwPmXi4rjfv DokWyFWfZ3rDk7UTdeiVii0qENg5EPpTjB0P/qx5qxkusoEaCg+PtdcRBXXyfZ4Q+T7FzC S9w4rDZ/a8xxoQBazrjEwwiymhOv7p9okHKHOWgs9X9Np9XOxDBjUTfDmqFhs1ZWDJttCM WDqvwzDGl/GUFLEw21gyE2mTSBOS8PxbW61wZvO1uGO7fN4BitctXRcwG/Zf+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694635426; a=rsa-sha256; cv=none; b=a1ierK1vGCB1/Dg+ifWRlZ/1tnMczQvW+AMCpaKdox2+dSIfugGhIsrLQehzBxtVS/SOXW W9QU8WxOA21P1EAZ7N1JwZXwgTE1hokPDzZgWsJnpS1BdfcJDz4JHx5SZT/0FR2bhtoGhP XhtTBCDVYOlEXGBw4x8KAt8MddnZDzm9aFBHIJPME1y5R4rP+gSmux2Z09ndQa1nEw9ak+ XxPkdco8qg6037hGi4g2K7ig6oUeLVoDEvqPTv0BPwDP0kBTnFp2d2e33suicEs9sV0AJu LGIuE6JiuMMnYifwepof62V2RG2/buTgvuMzEj7PdHi5kMD2B/DNq1U153BgfQ== 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=1694635426; 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=sxBlE8Iax24SBH0Wc5qbkcNtBSqeRXL3xTiZqbzaN8M=; b=NiZGUrFe28TKV+MAUOJOq8+fZB8NnjOS9ihC/I8TCoapypnDJVQ8LSOFMdkBvv2wWtiDYs 7BVh2+8Ek+v+jnOWaa95jNzA5vksrHCFrH8mS2JXfPfUtQokxlnSmQS1Tx8vl92qVhG9WN jPKQXhjg2JQ7Meu0LFrzEuF4R0YaPcGP3R0kfszHIxblseJeGjHXsgnqqnPETNtv8qSC7d GYPkOnfdvB9Q4KYjj9u2ol34bl6uxcCj6DJLxTPqftEv0iMSqCzQUgqXSZiYOqRG8Zv2Pb SjZ0eZoHFtncH6rhid5xCBk9Eyj3qdP99plKlvPYir6MA9Sqgo/hRZqpCkOuMA== 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 4RmBGp3NvLzCqQ; Wed, 13 Sep 2023 20:03:46 +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 38DK3kFh096998; Wed, 13 Sep 2023 20:03:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38DK3kiW096995; Wed, 13 Sep 2023 20:03:46 GMT (envelope-from git) Date: Wed, 13 Sep 2023 20:03:46 GMT Message-Id: <202309132003.38DK3kiW096995@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: 81be13da3ecf - releng/14.0 - init_main: Record completed SYSINITs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 81be13da3ecf8e32b6cbe93d301b4c24c36e43d4 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=81be13da3ecf8e32b6cbe93d301b4c24c36e43d4 commit 81be13da3ecf8e32b6cbe93d301b4c24c36e43d4 Author: Colin Percival AuthorDate: 2023-09-05 23:47:57 +0000 Commit: Colin Percival CommitDate: 2023-09-13 20:03:28 +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) Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41749 (cherry picked from commit 1926d5cef6eaa1302024d6471271c930ad65f9b2) (cherry picked from commit c31f2b5e6b591c61711018c3d6e52067ae860e9c) --- 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)