From nobody Tue Oct 18 14:33:07 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 4MsGYc1Bbdz4fxHx; Tue, 18 Oct 2022 14:33:08 +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 4MsGYb69Rqz3Klq; Tue, 18 Oct 2022 14:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666103587; 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=k5l0JsIGAJnwMRVDBzGMagZ93elpmfqU72WzU3zb/I8=; b=BAI3y7lc723k3zCac2ojnUT9AIO1ughhQKK81GY1P+zYrI0g/FIF6QtTiLTtQztkiKVNUh ZOvn7ulhnVCA1GIylFTjsu8HVmePpcK0JPL20jGL+kA5Qm589a83IkhL5ij0w3HPa47YFW uFSqfABnmRucd1NUGC71ccuwuD//fSLY/xOyZx0BV1888tilYOE2c0/g49hsNbNiCJ+mm2 H0TEjaVgiCsAJQ+OfIkvfNJTQT6iv0Ccjb8IwtZTC64nbtgMBqJym+4xnyNl/tGXg2EDeM 3wMA/ioTOxFwUbiJ4j1RSrHTuVchNfYY0fzIuTEAh5TNJ3hbwkKIYvnJNatFNQ== 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 4MsGYb4xynz1Bsr; Tue, 18 Oct 2022 14:33:07 +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 29IEX7oX029427; Tue, 18 Oct 2022 14:33:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29IEX7V6029426; Tue, 18 Oct 2022 14:33:07 GMT (envelope-from git) Date: Tue, 18 Oct 2022 14:33:07 GMT Message-Id: <202210181433.29IEX7V6029426@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: ef2aa7753012 - stable/13 - Reapply: "bus.h: rewrite comment describing intr_type" 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ef2aa77530127fe76711246cd5c4f1b95143e57a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666103587; 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=k5l0JsIGAJnwMRVDBzGMagZ93elpmfqU72WzU3zb/I8=; b=l/SrdlG063iKE14nR1vo4mT5DdDWy/I5fZIh4SMnHN1KDj1rBYt4vKkXk2u6fpqbs7eq00 13dbEZSsK2/MiGzNPJQ5y4HikYsOc9YfoFh1XV4NTo1ji5SymQcd+nmlJY8Ex3eHZZelP7 ohhI3G6R+jIz2zqOjozyBBjYwLOSsxcS68e7Ew3yMI4Xxu37V3ivjzo1A9Quox9UrwEq+e AsuoCzdnCSrj9EB3ORC3ypL2OmanqfsorzA/qBc6w95xnH6q/bwOrizQI0ya3WOPpkV5Cm RddZQdOVOgYBWljTL2EN/caJiz9YrriZCCQ2ayQ5h9OHW39l323E9xwtL6j2gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666103587; a=rsa-sha256; cv=none; b=Kucgc0j7j+P2IChUE65KhnTJLSSjmmgIfZbT9AHM0hve2NwY/HrO4O0efjsP7JFMXdxedP BKmB6pPFKwwWXzLXQAS7ty5cjflxnVi3gEOfQmA+DtgUNktdp0SqVp7191UCu3kYZ9eOGs 0oxSiGANczptwOkO1VB2wtMZF90ypP5U9S5sit4h9TEBkTDN1BXt+aKoDk1krrvG+L1H1F PNqavBAn8x6WxR/mnYySWWT2feKwDXQZeBeTN+Y+fjPBOyPtjP/9jLFyJfronpWxKvI13d D4LgzkbaKtOAUJ9JzGkk94MXggSlNl6joxYOWfEQO9TzYnCvTRCG7BIN/F4tzQ== 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=ef2aa77530127fe76711246cd5c4f1b95143e57a commit ef2aa77530127fe76711246cd5c4f1b95143e57a Author: Mitchell Horne AuthorDate: 2022-10-07 22:21:49 +0000 Commit: Mitchell Horne CommitDate: 2022-10-18 14:32:29 +0000 Reapply: "bus.h: rewrite comment describing intr_type" Describe more clearly the purpose of these flags and where they are used. Remove grog's comment about revisiting the flags. At this point it does not make sense to change this long-standing API, especially in light of 2cf7870864ea ("Collapse interrupt thread priorities"). Give a better example of a bus modifying these flags; I did not find any existing instance where a bus changes the interrupt's type. Reviewed by: imp, markj, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36896 Note: 2cf7870864ea is not present in stable/13 and likely will never be. While reapplying this change, I have modified the comment further to eliminate any inaccuracy Re: priorities. It should be applicable even if the change is merged some day. (cherry picked from commit af390486010e8fc78c4d715e751cd1175d0752c7) --- sys/sys/bus.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 430beaecc6d0..c017f38dcf11 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -251,17 +251,17 @@ typedef void driver_intr_t(void*); /** * @brief Interrupt type bits. - * - * These flags are used both by newbus interrupt - * registration (nexus.c) and also in struct intrec, which defines - * interrupt properties. * - * XXX We should probably revisit this and remove the vestiges of the - * spls implicit in names like INTR_TYPE_TTY. In the meantime, don't - * confuse things by renaming them (Grog, 18 July 2000). + * These flags may be passed by drivers to bus_setup_intr(9) when + * registering a new interrupt handler. The field is overloaded to + * specify both the interrupt's type and any special properties. * - * Buses which do interrupt remapping will want to change their type - * to reflect what sort of devices are underneath. + * The INTR_TYPE* bits will be passed to intr_priority(9) to determine the + * scheduling priority of the handler's ithread. For the specific priority + * values assigned to each type, see sys/priority.h. + * + * Buses may choose to modify or augment these flags as appropriate, + * e.g. nexus may apply INTR_EXCL. */ enum intr_type { INTR_TYPE_TTY = 1,