From nobody Wed Oct 19 13:50:34 2022 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 4MssZ22j6jz4g1N0; Wed, 19 Oct 2022 13:50:34 +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 4MssZ22DMqz3LCk; Wed, 19 Oct 2022 13:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666187434; 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=SY23UM0OafJymN9ZHgzpsyfEeyyczGjN/X9cRdyOR6g=; b=HF9B8yZW+JzvrlIP2arRBGwm6Dwf066TunWUMJETlPyS7m4USG8aec1Uz/fDC8kQMCqWaw XFzy1921+U/oZk87ZqzWZKnHBHt5Wt4/tj8PVM5z/6SVsaBbxGvVYvtnOgskkP0udHEKfM QHf8ygKSKaGGdbTQ9s3Y0zBlVZTahcDxEVmynkYGIkrOHiIuOKBJAimNXgzs8r+AVJn7Oy i/fZy0BVCHmhFfxkwSaPPf4ph/pfKTnbPgLs4fuAAsU8Cqo/08ei6HhBVpTkO39ZAeqoAR 0q48WgPIpnxePGrbjrdH/jiXixIAAZ4pkxayFhI8lSPcd04UngF24ZDjmwvH1g== 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 4MssZ21KSzzYFC; Wed, 19 Oct 2022 13:50:34 +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 29JDoYJu006525; Wed, 19 Oct 2022 13:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29JDoYwR006524; Wed, 19 Oct 2022 13:50:34 GMT (envelope-from git) Date: Wed, 19 Oct 2022 13:50:34 GMT Message-Id: <202210191350.29JDoYwR006524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: b34de75d61c2 - stable/13 - Downgrade tty_intr_event from a global 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b34de75d61c29e047fc6beaa04f99f96ec64de8a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666187434; 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=SY23UM0OafJymN9ZHgzpsyfEeyyczGjN/X9cRdyOR6g=; b=Hqfybn7wAke9PYLg7ta+rLeM6so6RMJsQDIPZlwluts2T0NFyM5xx+lG6zN8nN5MGyLAsm SCShy2wKoVycC2MxLPidLUFb5fapudjhrzbFFBMQ2tFAtx4naHp0xoLeI25KS1wLaVHTvV MQSbh76wiKxaOBE6GGlCvssCCi24itxe6jiVgnZVWZreeW43HstXFDZDZexLNovB3nczxm HOljIZYUSQT1JcRDQaGjTshwr6tGHF/4N1MY+K2A+4ksmCfhoTLsv8mY6hSnusAZEKTgLK W1niPxNjlM2LrxWhJTmGOtVGMq1cw885zorrcUo06muZTdjoOeKL2KHv164csw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666187434; a=rsa-sha256; cv=none; b=ZGYtFBezNU8ocQ60gVDYlOUpYICZWJunwXtQrnW84T8lZBc7Lz+Lg2tJPFOp8dRsbKHZTV yTBBgdcE0e93FSKjt5DQ+HpJFCOlLwUQRD/RudSjK+7y7ArWM/0pokqY7cV60fcmj1SU+n zfQjKq3LnjX7YKqOdG/CqPaUK+/eK9aEqb3ftmn1pyELZYqNxwrEkTRzRVtUoeNLnDCczj JWG4RyVoB+hPMdhaeipVjQMR19lUCifr7aG3ObuMGzZupyCQeJiObQbhJVdNHr20siZyPs 0/Ws0jv5Oni5z0nTjAGqWo3SxDQYSe6pwCd/omjIKc8tcBAaoKt2V616F9cjCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b34de75d61c29e047fc6beaa04f99f96ec64de8a commit b34de75d61c29e047fc6beaa04f99f96ec64de8a Author: Mitchell Horne AuthorDate: 2022-10-12 16:36:08 +0000 Commit: Mitchell Horne CommitDate: 2022-10-19 13:46:46 +0000 Downgrade tty_intr_event from a global It can be static within uart_tty.c. It is an open question whether there remains any real benefit to having uart instances share a swi thread. Reviewed by: imp, markj, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36938 (cherry picked from commit 05b727fee550598bfae5754783f9decfdeeb3c3d) --- share/man/man9/swi.9 | 13 +++---------- sys/dev/uart/uart_tty.c | 3 +++ sys/kern/kern_intr.c | 1 - sys/sys/interrupt.h | 1 - 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/share/man/man9/swi.9 b/share/man/man9/swi.9 index 0dfc924325d6..cba8e7dd6742 100644 --- a/share/man/man9/swi.9 +++ b/share/man/man9/swi.9 @@ -35,7 +35,6 @@ .In sys/param.h .In sys/bus.h .In sys/interrupt.h -.Vt "extern struct intr_event *tty_intr_event" ; .Vt "extern struct intr_event *clk_intr_event" ; .Ft int .Fo swi_add @@ -148,16 +147,10 @@ On platforms allowing IPI sending from NMI context it immediately wakes via the IPI, otherwise it works just like SWI_DELAY. .El .Pp -The -.Va tty_intr_event -and .Va clk_intr_event -variables contain pointers to the software interrupt handlers for the tty and -clock software interrupts, respectively. -.Va tty_intr_event -is used to hang tty software interrupt handlers off of the same thread. -.Va clk_intr_event -is used to hang delayed handlers off of the clock interrupt, and is invoked +is a pointer to the +.Vt struct intr_event +used to hang delayed handlers off of the clock interrupt, and is invoked directly by .Xr hardclock 9 . .Sh RETURN VALUES diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index ad7052289f0b..482a392cdb27 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -77,6 +77,9 @@ CONSOLE_DRIVER( static struct uart_devinfo uart_console; +/* TTY swi(9) event. Allows all uart soft handlers to share one ithread. */ +static struct intr_event *tty_intr_event; + static void uart_cnprobe(struct consdev *cp) { diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index b921004c21ff..449ae224bbe0 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -87,7 +87,6 @@ struct intr_entropy { }; struct intr_event *clk_intr_event; -struct intr_event *tty_intr_event; struct proc *intrproc; static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads"); diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h index f099e73e80d9..5feb3ebc9b1f 100644 --- a/sys/sys/interrupt.h +++ b/sys/sys/interrupt.h @@ -153,7 +153,6 @@ struct intr_event { struct proc; extern struct intr_event *clk_intr_event; -extern struct intr_event *tty_intr_event; /* Counts and names for statistics (defined in MD code). */ extern u_long *intrcnt; /* counts for each device and stray */