From nobody Sun Dec 1 04:56:58 2024 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 4Y1F565jGNz5gD5c; Sun, 01 Dec 2024 04:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5657Nqz486X; Sun, 1 Dec 2024 04:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029018; 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=8iuTXPZe1X6RFNqyrm4j/i8jweA1yX3NQrUCySMPavo=; b=fBobuW+OoyzR4nwzYwLyrcUHN1YCw6pppcpGwsWsv4fl7f/5HU0F/n7naqyWEXoRHVjHxz tISajeO7tHu+eFHs9UAGBB2OLKnSNTWm8R1BjSGI74GQAbA0852J3WXdK39zBlfCsw+K9r x41/FWJ7o/DEvKp3WDmErSZ6H+evMhyxfJPy6L2NTozCAnmRHXepSNihwj//+pYMVpex/x GoUDVm1qLuEztptO8mtHXC2KvtX0osEIa+WjYBxDHWL8M3O4hSJFDeDlRmIow+goOijTbX lErMA7VT21Qus6Zx+4NiMWRJNnsRsHY7+m2FOy06+rwthXGYOjMpYIwdLPKrNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029018; 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=8iuTXPZe1X6RFNqyrm4j/i8jweA1yX3NQrUCySMPavo=; b=aJMo77v9FEA3wf3k+sTaszhMf6KmkIPQaNUXBhnZtI5AwWmvtSz1Pr1i7Dbu7TkgRahY4X pg4HyVvTguOIZzd/fMVlVHlNguveIJiCl55K0zgytF0L0a+zVSRdr08fcgqVT1BsBn4/d7 VB746kW/a+kvegzv3P52psL1mdqVmWDTqjlFPn9HGXWNvDIm69i+Etv1bTWO39ihSPmu+Z 1eGBd69Y5TPBH4h44eEJl0zs5z6xHU3lBazsLJW5UhvtTSxDQoLZHyZz1Nag5GfPUwQed3 yHX5L/Y917dXDKzzZznXbNoLQbw8i4kxgRv6dd+unzTGHDexnViJ+zapD1wGww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029018; a=rsa-sha256; cv=none; b=bIqbEwLc/+MSwOwyJwMi7d2Oj8lXr/3ZZha5DX7rjcOLAPll0gEWE0+xM1/4tqg3RfYGKA JzjrnHhTFEc83j0jhUdqmzgzl4f6gZjBRf1UCA+0xnORUsgExQVwwJPpBoUPq/B4Uhf+l0 y5tkmm9KDju5wH2fX/J+/UW523Cx+BSc8iomeHMKsmp/ppalqBdwma/0R84m1let3CLDuK o/tJQrdpX22Ynxs0xU3Z8cHdaa45VGytwPINLMxEDtzQ5a2JviRLMlTtrE1ltEgNZC2dt7 iqXhJQna4jPNvWNOA8wYnwEybzoWivvbDvYc+PkrTXZjgjBul3Og1qa0WCY+qA== 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 4Y1F564T2Dzdmv; Sun, 1 Dec 2024 04:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B14uws8094590; Sun, 1 Dec 2024 04:56:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uwJU094587; Sun, 1 Dec 2024 04:56:58 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:58 GMT Message-Id: <202412010456.4B14uwJU094587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6e1d5e32a2f6 - stable/14 - cpufreq: Use a real device_probe routine 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6e1d5e32a2f69014757c47049d9e29ccec2c289c Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6e1d5e32a2f69014757c47049d9e29ccec2c289c commit 6e1d5e32a2f69014757c47049d9e29ccec2c289c Author: John Baldwin AuthorDate: 2024-10-21 14:24:15 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 cpufreq: Use a real device_probe routine cpufreq doesn't have any child drivers, so calling bus_generic_probe was a nop. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47184 (cherry picked from commit ce968b095e75262ba3605491acf6850ce331481d) --- sys/kern/kern_cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_cpu.c b/sys/kern/kern_cpu.c index 524ffc1e3420..247b5f6c150a 100644 --- a/sys/kern/kern_cpu.c +++ b/sys/kern/kern_cpu.c @@ -98,6 +98,7 @@ TAILQ_HEAD(cf_setting_lst, cf_setting_array); printf("cpufreq: " msg); \ } while (0) +static int cpufreq_probe(device_t dev); static int cpufreq_attach(device_t dev); static void cpufreq_startup_task(void *ctx, int pending); static int cpufreq_detach(device_t dev); @@ -117,7 +118,7 @@ static int cpufreq_levels_sysctl(SYSCTL_HANDLER_ARGS); static int cpufreq_settings_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t cpufreq_methods[] = { - DEVMETHOD(device_probe, bus_generic_probe), + DEVMETHOD(device_probe, cpufreq_probe), DEVMETHOD(device_attach, cpufreq_attach), DEVMETHOD(device_detach, cpufreq_detach), @@ -142,6 +143,13 @@ SYSCTL_INT(_debug_cpufreq, OID_AUTO, lowest, CTLFLAG_RWTUN, &cf_lowest_freq, 1, SYSCTL_INT(_debug_cpufreq, OID_AUTO, verbose, CTLFLAG_RWTUN, &cf_verbose, 1, "Print verbose debugging messages"); +static int +cpufreq_probe(device_t dev) +{ + device_set_desc(dev, "CPU frequency control"); + return (BUS_PROBE_DEFAULT); +} + /* * This is called as the result of a hardware specific frequency control driver * calling cpufreq_register. It provides a general interface for system wide