From nobody Mon Oct 14 22:17:31 2024 X-Original-To: dev-commits-src-all@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 4XSBRw0pNlz5ZG6x; Mon, 14 Oct 2024 22:17:32 +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 4XSBRv73kDz3wtg; Mon, 14 Oct 2024 22:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944252; 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=Q5r37DPmF6ZhDabiBYXGWKVX79Go3qQFHcw/cqJ4C7M=; b=J0zkH7C+0PGR02UAxwrMf59ilbTEr0wLAWLzSd6x9Tnk6p21xMcRvWWNlkL9LhhZ8uEVBC EnH5bY15XSa0sVc/4Rz/2ZxEyas11yJI0BJpGy00FCHjrsLnvM2p7sbpug554AK4zZFaIb ILiQN/lacIL3IFq8/9c5U8r3PRqmHhRGmbcqIN3Ifvk2LY7TtlyEbcEdEnYsmJsfB2hsWP tCsxc0Pf+KHakEC/ZpuDB01hCf7Dn7MheoXw21CupqTDUo8DxOIvLtexfyXigaViN3NzM1 j+HdEpfhnt4fkfTUuYmXeIlHGJplNbxDZsNV0+N4je4lc34G57ETdEjX3JwPKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728944252; 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=Q5r37DPmF6ZhDabiBYXGWKVX79Go3qQFHcw/cqJ4C7M=; b=FMLC1z/epfS/RHnjBFzLaZ/vXjBdJ94UkVcfsPyxMkMPnC5goU9Rg7Bb9LBGsybhfk0gHT JfGN6O4af2o65F9jb0fnqGyS7jokIoPOefHhXo9DAGzmCx7iQO4u8AkrF7iei06HcTlTFs LS+ystL6wpsoid1hotTbRk9+Ef0aBTsLIt+BnWVFUZS1sKDyGUHpelyGYbPoF8zYoVcVM6 ham5u3W2/hwUSKY0APDg/uLLXP11q28OQe5KT/3iUr4Jo7Zq8LitEYAAC0Y+Pt6bMZLRCP OBgnU+ctaY7Gi74dYjn2ibiSJK3AYEAdGRgvbPkNJRz0IgMYWmNX8kLeZ/y4oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728944252; a=rsa-sha256; cv=none; b=TzVkeMfY7LSzlLb3HYKWWsSbifCpoPQKBRGLbSMCn3X3a9ac8eZ22ukfVyStP9SQ9EBZsk RmIsH7UNv9Dp2uZPDREQviLY4PUI3z4bDQypzvs5qCyu/VGGfrO/xrWyYwdlVN1MADOG0S jhAKO9teTwfb5rj0nBvX/6vwrvr9j2RVadbsgduJghUIEzo9PjUzXYfg8DFNoCHVZrQjvn uc2Ky03Uls/zMnLJujcYhf4e9ybKrVXsWwIieQHDGk3yr7n7MfSutCme5PUvW8tWVDb2oR jtFKURwUvZ5UKaWAqv7T+gke+yaPNi8NIio2oUAWdp3aXKFGPqkShtghLcw71Q== 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 4XSBRv6gglzwRv; Mon, 14 Oct 2024 22:17:31 +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 49EMHVJg074666; Mon, 14 Oct 2024 22:17:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49EMHVw4074663; Mon, 14 Oct 2024 22:17:31 GMT (envelope-from git) Date: Mon, 14 Oct 2024 22:17:31 GMT Message-Id: <202410142217.49EMHVw4074663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cc7854e10903 - main - uart: export rclk via sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc7854e10903cd4726a4da6610ebf4dcf69de352 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cc7854e10903cd4726a4da6610ebf4dcf69de352 commit cc7854e10903cd4726a4da6610ebf4dcf69de352 Author: Warner Losh AuthorDate: 2024-10-14 21:57:16 +0000 Commit: Warner Losh CommitDate: 2024-10-14 22:03:58 +0000 uart: export rclk via sysctl To help debugging, export the rclk a uart is using as dev.uart.X.rclk. It can be opaque when it is wrong since any error messages printed to the system console using the wrong rclk aren't informative. Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47070 --- sys/dev/uart/uart_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index 71f39e4c71e7..d0c4a54c8038 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -752,6 +752,11 @@ uart_bus_attach(device_t dev) "rx_overruns", CTLFLAG_RD, &sc->sc_rxoverruns, 0, "Receive overruns"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "rclk", CTLFLAG_RD, &sc->sc_bas.rclk, 0, + "Baud clock for device"); + return (0); fail: