From nobody Mon Oct 21 14:26:49 2024 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 4XXHgY2Th3z5ZLWn; Mon, 21 Oct 2024 14:26:49 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XXHgY1ss1z4XLZ; Mon, 21 Oct 2024 14:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729520809; 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=GjuLxzWgWqr7rKwZAtAGD+RiZpfuBSaPfCfMNsb8UQ0=; b=K4vi3MlXBtHuyZFmowxoi0CoTBzF4z4qGl1zBV66vLHeZAikq+WPYCWDBCKi6zOR2FLJmS DJxm6w8P4OOFyGB/0eWtefF1QohgsLQBh8mH7otJ01lsk54I/sDDcD9oWVJGVIHqYQ+LES EiWIWgrWlbZI1FQ24Q1JRVsbFVHL5SZhD+M1xSTCywcf7WWEPtRH1pqP2lHJFIQydfTR2K eInP9/esSTtxwIoNKO33VNSbeXXTUD3fD+dnx8q57xa20ozu2ZFTlknicyNAo6UJN5OvX4 NdYc839j3G29ItUvAvZAByB5B+hjRKa9o841hWIJlYpxVlYhl51AX+Ve2zFFrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729520809; 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=GjuLxzWgWqr7rKwZAtAGD+RiZpfuBSaPfCfMNsb8UQ0=; b=l+atofYmKgglhrxpwNJ8KWbEoA41IKiwp9AiEqwFb/QGTXqekqpq1wT17dqdAu9hJc2gpe aiqDK+rvJvQ5UmKJ7+SSzlJ0QHXBbUII3r7/YfqZ7sI3t5h5IhPAAny8aY2/HOqAOQdGzF 5P7lovI8o5I7X/q1Z9vjQVXrnshqgwubBcdNdNKgL0236leg6DW1hRuBN1o2UbXUrFrEtu YDsFvtX4+lLmzQ5DbTVEYAqfa5kgS/+A9MXPH/bJaKWskYTm81c0CInuNJupt6hsRZ4xt+ bx04qbnpxPWs4EGDdSIqUI0HzzIF5AdN9Pm3WWfM4pBudaDl4PUkT1xXCc5YRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729520809; a=rsa-sha256; cv=none; b=gHSpKXWcyT227U/W9yGjcGMtyW4DOORifoItw+H+5AMEoQN99J8SdXptQm9poze2bTIbN2 aLnVLkuGjrbG7Nc0ecs3tVLLimM9Q9Li9ctanUUWsJqkXr2nsSQuzCcZGlfG+t4hfTRgap TblPiqodfPxtAS9prh2Uo81ICFg2Qm2PjiFW2qhFYZpgIeyc1+tPtAXw/Qz4SFgSesSXKG JsqA82VsfTlGtPm8nwdwvWwrtIIAfE+qGAiYzgVztvJel20Bwy29A6TCuLQiuJ7hnw15Qp aqiBqxvML+mOkyMveCzYJ8K8uzSsPtaVJCHFMjsYfWNTGKYaOlP1m187s4/OZg== 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 4XXHgY1M1VzZM0; Mon, 21 Oct 2024 14:26:49 +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 49LEQng9071840; Mon, 21 Oct 2024 14:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49LEQnjR071837; Mon, 21 Oct 2024 14:26:49 GMT (envelope-from git) Date: Mon, 21 Oct 2024 14:26:49 GMT Message-Id: <202410211426.49LEQnjR071837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ce968b095e75 - main - cpufreq: Use a real device_probe routine 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: ce968b095e75262ba3605491acf6850ce331481d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ce968b095e75262ba3605491acf6850ce331481d commit ce968b095e75262ba3605491acf6850ce331481d Author: John Baldwin AuthorDate: 2024-10-21 14:24:15 +0000 Commit: John Baldwin CommitDate: 2024-10-21 14:24:15 +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 --- 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 23256f37a3f7..1b55ebf0738b 100644 --- a/sys/kern/kern_cpu.c +++ b/sys/kern/kern_cpu.c @@ -97,6 +97,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); @@ -116,7 +117,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), @@ -141,6 +142,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