From nobody Fri Oct 07 22:27:07 2022 X-Original-To: dev-commits-src-main@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 4Mkjbc2xbCz4f2Hg; Fri, 7 Oct 2022 22:27: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 4Mkjbc2P1Nz3ffK; Fri, 7 Oct 2022 22:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665181628; 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=gLClkt1qKupGDduyGGrNMLfJUxVe4jxsw9FqGJa0+qY=; b=KhDw/EA8QDrONXsivzbswvMlnpS6w6Cqvrv9QX0mg1nFcmQW0ietdMKqyC7sAKqtDKYaSU /Po41eOJztd9TMJQy25IQbbdxIL7vfxiWebGuCdAnRLXUekCoHnTEsEvyVbEMfycj16Bw2 sKs/m+I1d/WFYd9My88KoeFVnTBDu1YgzfFoqiZZRVfBO1SfgfAWSOgP4Y/XU6hmlmOsJQ awLKyyXhRYjyjuldCy0jDnyvp6VwWaBf+fnGKowwa1S6JlyGiDO5JtUH20WgHLP2RBtPhq tOQkKQvhr4I92kqkG/YPL8yCdiu3mTC/Dr2Et4oQcxTm6eAgo5rPq7SUBuAYGA== 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 4Mkjbc1B0vzl1k; Fri, 7 Oct 2022 22:27:08 +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 297MR7Wa072798; Fri, 7 Oct 2022 22:27:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 297MR77n072797; Fri, 7 Oct 2022 22:27:07 GMT (envelope-from git) Date: Fri, 7 Oct 2022 22:27:07 GMT Message-Id: <202210072227.297MR77n072797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: af390486010e - main - bus.h: rewrite comment describing intr_type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: af390486010e8fc78c4d715e751cd1175d0752c7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665181628; 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=gLClkt1qKupGDduyGGrNMLfJUxVe4jxsw9FqGJa0+qY=; b=rzukhdoxnXpMiF6cLglKvtoKp4BoA2ujISiHqcAXOI7xFzda6Lb1dA417VvqIW/aOZb+Jp uGU6DFwZnBwH9ZL5s7nP8tJ1WAzOuvQpb05m7l129F5izhf2a3G8ooKnRDljsh25AeY/OB zl5yOWiVeDhgL9kXYDhwS9jA3irq+idGvyROVf2zy8eX1lPIrGc96XB9BFYTizE78Otf4E Tr6wXtBiitXlSdC/47rYbblzLsGpwFA3Cd1JKJHyviE/4ohIENjfc5uuhA+bpT2zjZBBE1 MNj8O4iez3zBPfr53KlysmxJZzbZL9LrGAP0smsCkhhcemyJUg6ezVbA190KSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665181628; a=rsa-sha256; cv=none; b=vidXDuvF6PxF03Iji8GLGaeYXidCYCrsMMcxrlatPxVWblE1sn6hJCrKH5X9aUdQCtF90N WGI8nomEo8mwaqA7of4SWnCMn3A0bLXEG66XdLoRMspXxEHEghAwTbOFk/nfH7CzKIdjDk bSYOx6YMkuCiw3Kdt1++Hx9j4sVHNoAHmRe1dvY9yhqGdmjcBLGLvmqyURa8TmXWgUcw/q 6eMqzhna/f3oeXjQ1VsYd9WMzg9MMmrjEi8yOwtN7aHhZgRGjoOf9AecM1UtL+oT2cgu5E 6/KzRnH0TAVVozD83o5/gxYcbxk8ku/lGZ8dlmHm/1Y/3lrkubjfl4lCEKMFow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=af390486010e8fc78c4d715e751cd1175d0752c7 commit af390486010e8fc78c4d715e751cd1175d0752c7 Author: Mitchell Horne AuthorDate: 2022-10-07 22:21:49 +0000 Commit: Mitchell Horne CommitDate: 2022-10-07 22:26:41 +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 --- 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 c363d1ec550e..26d100aba222 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -252,17 +252,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,