From nobody Sun Oct 23 09:11:32 2022 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 4MwCBF0Qm8z4fSFt; Sun, 23 Oct 2022 09:11:33 +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 4MwCBD6fCTz3Bq2; Sun, 23 Oct 2022 09:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666516292; 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=/NZVfiVRxcT3lTQXYoZQq5VQZxHgr3U5r5rpvjRA7VA=; b=dOEU4PNeh+gFtBxTfmObFSfXDhxvWX0Jbik326Po0L8KT3DslQh7vdkKtVnbyFu3dz3H0B Z6bdsWjZk6ZXxLwFox388O6j+zRM1PIWkM7aEC/3ZZ30QTLT3TYaHqA/aciB6gwkBRdNOc NTsohWA+VBFalCI4wbs/7PUi6uvmthu+lLrtGvoPwzW3NlAkyQXHnxeVwU2mjVzHE1gyBL wq7E8PYKxdBL614IiC54Mln5hyvichIHRHzkdxzeoj4BxLd39JFC7agJmUPnLRwNXlwFzO XJ08oXeH9ih7v5W30NaRPrV2Obe3QahrUvIGYYT9ZXikmFMZ4pQjODb3t0cihA== 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 4MwCBD5jx9zqyh; Sun, 23 Oct 2022 09:11:32 +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 29N9BWkn026407; Sun, 23 Oct 2022 09:11:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29N9BWxS026406; Sun, 23 Oct 2022 09:11:32 GMT (envelope-from git) Date: Sun, 23 Oct 2022 09:11:32 GMT Message-Id: <202210230911.29N9BWxS026406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tom Jones Subject: git: 15bd2f366d3e - main - acpi: Create cppc_notify sysctl before it is checked 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: thj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15bd2f366d3e878f5a8bc1628368d59ef318af5f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666516292; 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=/NZVfiVRxcT3lTQXYoZQq5VQZxHgr3U5r5rpvjRA7VA=; b=Mpo2eT8kDCGvMxPMfYbhFgumTtv+h67Mxyf+SfPf07pM9dSwCuFCubzm1qye0Ze6PWEQTV NTBRLbFO1rWx5c8I9JaMZ4pD0Roh/g/AUVowOQYVtftPBtcozRQmDzxOpzuKqq+8V6blOU viwvC5SHC/MTVdHenkal5Gri6A4HfDI2G5u5ltKCznoWmirSsSDHOtooq4AzQ6JcpGyjc7 /LPJSSJnWtwvyRSj6V+mTPekAPE2uIxs8hX9lVyWu8GjatNgulgklvr6oOCOHE6/vCnzIi RScTdmu551nuJXN1eAvQzqhAxOYw2h17Z+az4VJSGrVGBXt+/ucCU8r4FIoxWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666516292; a=rsa-sha256; cv=none; b=ZjmwvVbBrPSP7R4YEeH0q6MsAjrGwAb5ceYewlDTZ5HJRjqo27GYDGgM5cPmLH2rX/32n0 ws4FQDGZscrOrRr0xYwRAHN1ahdyiP579Ie9eBvA2OZY4TIdc7FvnIfszMS+uIJ0TEu9aF 3cBDgnyfOd/7Nho56a2j0+XK5ICOznfk0o20mFsi8XVCt93VKcyA7p/vZzBynXlwSMSP5r KQSP7a4zrr3xwQcZxz+8IyBUo26gplnWOgVm7ek9lUCUYGkZwtdXbuSm4s+hXztBc7CFYt 0e2So9jMRLwdCIpCB/Vhf1RjWMb4mFcqCzQJvQ+E7nCKGaSwsH/uCSidw7LkGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by thj: URL: https://cgit.FreeBSD.org/src/commit/?id=15bd2f366d3e878f5a8bc1628368d59ef318af5f commit 15bd2f366d3e878f5a8bc1628368d59ef318af5f Author: Tom Jones AuthorDate: 2022-10-23 09:09:28 +0000 Commit: Tom Jones CommitDate: 2022-10-23 09:10:56 +0000 acpi: Create cppc_notify sysctl before it is checked Reported by: Henrix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D37081 --- sys/dev/acpica/acpi_cpu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index ea99cfdeb90f..92809966bfba 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -381,6 +381,14 @@ acpi_cpu_attach(device_t dev) cpu_sysctl_tree = SYSCTL_ADD_NODE(&cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "node for CPU children"); + +#if defined(__i386__) || defined(__amd64__) + /* Add sysctl handler to control registering for CPPC notifications */ + cppc_notify = 1; + SYSCTL_ADD_BOOL(&cpu_sysctl_ctx, SYSCTL_CHILDREN(cpu_sysctl_tree), + OID_AUTO, "cppc_notify", CTLFLAG_RDTUN | CTLFLAG_MPSAFE, + &cppc_notify, 0, "Register for CPPC Notifications"); +#endif } /* @@ -987,14 +995,6 @@ acpi_cpu_startup(void *arg) NULL, 0, acpi_cpu_global_cx_lowest_sysctl, "A", "Global lowest Cx sleep state to use"); -#if defined(__i386__) || defined(__amd64__) - /* Add sysctl handler to control registering for CPPC notifications */ - cppc_notify = 1; - SYSCTL_ADD_BOOL(&cpu_sysctl_ctx, SYSCTL_CHILDREN(cpu_sysctl_tree), - OID_AUTO, "cppc_notify", CTLFLAG_RDTUN | CTLFLAG_MPSAFE, - &cppc_notify, 0, "Register for CPPC Notifications"); -#endif - /* Take over idling from cpu_idle_default(). */ cpu_cx_lowest_lim = 0; CPU_FOREACH(i) {