From nobody Tue Oct 18 14:10:27 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 4MsG3R61M7z4ftps; Tue, 18 Oct 2022 14:10:27 +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 4MsG3R5Hm3z3Gcm; Tue, 18 Oct 2022 14:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666102227; 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=lz7VcstomLq5qRXhQQmiGnFMJIuaDSLvpbgWPBC2YCk=; b=W1Fla5tSvk47d//L84ULRBdMPqayk1aZU7GZMilvkr/UuI9E2XV4KUwi2tOJk8i8MAo74L GxQ3QfImiy9HKNGaluD1gxoxLmcCiKSK7szlpfzqZYg3vCAsvRBrdOCh04C9PqrzMU0WuX dlrDyBwmQ4kpsjfq4+sAT48VCPIimN/e0tPOf16e/MQeFKKkvlIfTYgVLXgJIMyI5E4/76 5Fw3sFZG/vBBx5zJOg8bFFDArSahuooYe+GZaVW+oW5sLgcJoSi6Edf8nwPpllaUz+4bQg RUUGitYKko7+x3JzrXQGK3Auce4y4IKYbUC7uBN/TY2QoKCmCFwjk8hHjK35IQ== 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 4MsG3R4ChBz1BrL; Tue, 18 Oct 2022 14:10:27 +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 29IEARbs001752; Tue, 18 Oct 2022 14:10:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29IEARnZ001751; Tue, 18 Oct 2022 14:10:27 GMT (envelope-from git) Date: Tue, 18 Oct 2022 14:10:27 GMT Message-Id: <202210181410.29IEARnZ001751@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: fff5fec16b2e - stable/13 - 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: fff5fec16b2ec42b0cb357fdbb675353e3126f21 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666102227; 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=lz7VcstomLq5qRXhQQmiGnFMJIuaDSLvpbgWPBC2YCk=; b=Wz8YvNNJWfe2yuX8s5m7cF9FuFNkuUYPFJ5NOkykeLekjaleMrNqIVSpvkZ8iGDSY38/yG 2qyBTVxn91qkbsYqeAxvqOtrnYvOsVzJzc1O27d9lsF2S8RPkZeMZq32O4p9qM1gCBgF1U 1iWDYuvkV/jWLL2rTq2e0yct2UdoL95PM08TfaLOOmZEr4XH5Dh9v4RTFNlQvFjZhGLWzk FGo55938BlYI6UxqNB3oze+xPaXKI6tIwGevGl7+9Tu9nCQmWeDqE62gx/PBQx8kmYDy6x dmuDf1Nq39do728EkIRIefhECu8iA7UhWgqFRoelrSpcnp4gYjaN+4N0YSweFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666102227; a=rsa-sha256; cv=none; b=lL0VWULZ5E6UTqOCbmebYucHydFGzBRKOrvMb7cMqRQch3omN8HBlV35SytQ4N+0nX/6W7 /T4oVnA1ncYnfMGEHJ0GrCz7Ce7rUO1XJE0QhH23Rj7qo97/lnlX3n2/R+zp6vJ+oi6qXy +bW3qTTmgAc3wYgoYomWh221+4KvvN/a9T4fjNwlV4f335jVyqdQ/LjfonFzniLmsNPhs7 lqhVcLHpBEtH8esIoyvnmpwbwmtY0RmiTEdmQyqVl8U8vTRUhvVF/TnD8UY0sZ8/ebK7NN djB1J3YWJ8y30/pSofmvGu6sJbBS2/fHw0CI2lED+399ASwdSPB6hfuVr8UvLw== 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=fff5fec16b2ec42b0cb357fdbb675353e3126f21 commit fff5fec16b2ec42b0cb357fdbb675353e3126f21 Author: Mitchell Horne AuthorDate: 2022-10-07 22:21:49 +0000 Commit: Mitchell Horne CommitDate: 2022-10-18 14:08:21 +0000 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 (cherry picked from commit af390486010e8fc78c4d715e751cd1175d0752c7) --- sys/sys/bus.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 430beaecc6d0..115f20505bae 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -251,17 +251,19 @@ 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. Historically, each + * type was assigned a unique scheduling preference, but now only + * INTR_TYPE_CLK receives a default priority higher than other + * interrupts. 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,