From nobody Sat Jul 23 21:44:25 2022 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 4Lr0FQ0Ffdz4WbCZ; Sat, 23 Jul 2022 21:44:26 +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 4Lr0FP6s1xz3brH; Sat, 23 Jul 2022 21:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658612666; 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=AiPb+ZhLwXzsX2bqfvWsyXQrBSJCKbqCP7sXcEzXTgc=; b=pS82lbywphe5+K6yo0ixDrDHmrXGMcTffVLV31+Y/F1vnWrRGnPjajwWU+p388QSFu8Zwb XZtgGg3W914v4Ee69JXcUJEPf56IXy7ECN19jJOANmt+xUV16MeNO9+e3lvOoO8wPUxX0C ZAGiyCo9FyKFt5bggXNWvyttzNUD7zi2D1Oio8OR2/z0utDtNHAmxHb2kHkT0stRdvEk+t V5W22SPhdkJZJ4GH/XrxNDHEYM5Gcuo+cbVoHkSkgqgVz+Qnngklrz717MRv8RYSpe5uZR llz4wnjnS2qUJa8gBZjR286RSvPlJhC7Yc8Uu2XSkAPK8q6sX4MSatOIO5GFAw== 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 4Lr0FP5tc9zvCQ; Sat, 23 Jul 2022 21:44:25 +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 26NLiPL1055411; Sat, 23 Jul 2022 21:44:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26NLiPWM055410; Sat, 23 Jul 2022 21:44:25 GMT (envelope-from git) Date: Sat, 23 Jul 2022 21:44:25 GMT Message-Id: <202207232144.26NLiPWM055410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 17a4a163df85 - main - Revert "Fill in cn_name in struct consdev." 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17a4a163df85e2cbe20e4fbdb03c56085e8079e6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658612666; 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=AiPb+ZhLwXzsX2bqfvWsyXQrBSJCKbqCP7sXcEzXTgc=; b=nRdL8JDmYDAnadtXEorfIPeY4DdvV3MgaKvcS9vip3OqaPvVNYix7hCZ7JQj6Hsmc9hcOt US8mVne47iYy5ba1VnEmGHhfpSCZMe46JRjYsGu9+d+901vQI+uLnwjOGEp/eygC8t6X37 hOk5BP3c0+wezhGei57NLvJnOGNCkuVz9HB9QMfASAUNsOb+o5AmwQ0IjzMeTre5y6VF9f yUQeDhH6xeRxWg8FOnuZED8DhBn9plrQanrKqNgw6krKWjhQXs2P0cgLebhbfrfKCGDz85 2s6Ydes5Dh2GSCyUBxlHnP3fvTUHJUCu2B/vTSXjXmzG4ZZjDE2dwSQnlx4mGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658612666; a=rsa-sha256; cv=none; b=M2SQrmtZs4E0MnTwKM0fwZ7DEUVBybbjfWaiqCyDRwr3mBQ9hdjhB6JXesCWrcurFyhSFi HWufzaScYEX30aXQGqGb3xBgCmDhrzJbR46X/Ro3VtwRmIx4Vg0tpHeBF7iNjummSh6mxn /r1SwJN7cVNy7s/DYm1bxZy6NxzndGqd5QUUWC8AzNOsZTRv1DxBJ667b6x/R8K0/VqG4F 8juzRYNEpYCE4ZJ/kt76FNDLfDW8pRUDF1/4OPyQCtSqLVYuP0Os0aKAkk5epkbMxg92Bw mBqr8gY3TOwlQpmnePN1i1p8hHUxdXYPJFqcUAH/+Od4ZsOrogA51wja+KSB7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=17a4a163df85e2cbe20e4fbdb03c56085e8079e6 commit 17a4a163df85e2cbe20e4fbdb03c56085e8079e6 Author: Jessica Clarke AuthorDate: 2022-07-23 21:44:19 +0000 Commit: Jessica Clarke CommitDate: 2022-07-23 21:44:19 +0000 Revert "Fill in cn_name in struct consdev." This reverts commit 82a21151cf1d7a3e9e95b9edbbf74ac10f386d6a. This commit was made to aid debugging before consoles are initialised so that they can more easily be identified from a debugger. However, various consoles (cfecons, ofwcons, mambocons and rcons) all check whether cn_name[0] is non-zero to see they are attached or not, and so this breaks that (perhaps misguided) approach. On RISC-V this results in rcons (the SBI firmware console driver) racing with the real UART driver and so input gets probabilistically lost on the real UART (around 2/3 of the time for me on QEMU). Moreover, the name given to CONSOLE_DRIVER isn't necessarily the same as what eventually gets written to cn_name, such as cfecons vs cfe, rcons vs riscv, ttyj0 vs aju, ttyv0 vs sc, ttyuN vs uart_phyp/opal and all manner of things vs ucom, so in some cases this is in fact misleading as the name will change after attaching. Discussed with: cperciva --- sys/sys/cons.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/sys/cons.h b/sys/sys/cons.h index fec7f6c01b84..ad73b258df6d 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -104,7 +104,6 @@ extern struct tty *constty; /* Temporary virtual console. */ static struct consdev name = { \ .cn_ops = &ops, \ .cn_arg = (arg), \ - .cn_name = #name, \ }; \ DATA_SET(cons_set, name)