From nobody Fri Nov 12 19:03:20 2021 X-Original-To: dev-commits-src-main@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 942211840573; Fri, 12 Nov 2021 19:03:20 +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 4HrSfJ3dwrz3HNC; Fri, 12 Nov 2021 19:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5CB3724B7D; Fri, 12 Nov 2021 19:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ACJ3KmW042576; Fri, 12 Nov 2021 19:03:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ACJ3Kc0042575; Fri, 12 Nov 2021 19:03:20 GMT (envelope-from git) Date: Fri, 12 Nov 2021 19:03:20 GMT Message-Id: <202111121903.1ACJ3Kc0042575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: ae062ff2695f - main - Move KHELP_DECLARE_MOD_UMA later in the boot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae062ff2695f61e43e23e144db62cb251b2cf599 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ae062ff2695f61e43e23e144db62cb251b2cf599 commit ae062ff2695f61e43e23e144db62cb251b2cf599 Author: Andrew Turner AuthorDate: 2021-11-12 18:28:18 +0000 Commit: Andrew Turner CommitDate: 2021-11-12 18:56:58 +0000 Move KHELP_DECLARE_MOD_UMA later in the boot Both KHELP_DECLARE_MOD_UMA and the kernel linker SYSINIT to find in-kernel modules run at SI_SUB_KLD, SI_ORDER_ANY. As the former depends on the latter running first move it later in the boot, to the new SI_SUB_KHELP. This ensures KHELP_DECLARE_MOD_UMA module SYSINIT functions will be after the kernel linker. Previously we may have received a panic similar to the following if the order was incorrect: panic: module_register_init: module named ertt not found Reported by: bob prohaska Discussed with: imp, jhb Sponsored by: The FreeBSD Foundation --- sys/sys/kernel.h | 1 + sys/sys/module_khelp.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index e96eb52b52fd..765484df351c 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -105,6 +105,7 @@ enum sysinit_sub_id { SI_SUB_EVENTHANDLER = 0x1C00000, /* eventhandler init */ SI_SUB_VNET_PRELINK = 0x1E00000, /* vnet init before modules */ SI_SUB_KLD = 0x2000000, /* KLD and module setup */ + SI_SUB_KHELP = 0x2080000, /* khelp modules */ SI_SUB_CPU = 0x2100000, /* CPU resource(s)*/ SI_SUB_RACCT = 0x2110000, /* resource accounting */ SI_SUB_KDTRACE = 0x2140000, /* Kernel dtrace hooks */ diff --git a/sys/sys/module_khelp.h b/sys/sys/module_khelp.h index a66440277a41..bab33e487497 100644 --- a/sys/sys/module_khelp.h +++ b/sys/sys/module_khelp.h @@ -87,7 +87,7 @@ struct khelp_modevent_data { .evhand = khelp_modevent, \ .priv = &kmd_##hname \ }; \ - DECLARE_MODULE(hname, h_##hname, SI_SUB_KLD, SI_ORDER_ANY); \ + DECLARE_MODULE(hname, h_##hname, SI_SUB_KHELP, SI_ORDER_ANY); \ MODULE_VERSION(hname, version) #define KHELP_DECLARE_MOD(hname, hdata, hhooks, version) \