From nobody Fri Oct 20 21:54:37 2023 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 4SByzf0GSYz4yGx0; Fri, 20 Oct 2023 21:54:38 +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 4SByzd6VDZz4g4Z; Fri, 20 Oct 2023 21:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697838877; 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=ddZfvzM7q3/TZhKHPPyMz33QHfqWZ4i2lPdg1CjwQf4=; b=K9wI6ZNj3lOde8WP6SoPi2FbtUXMf5MDN3fGmctMxoYK4dCXf8JWUdur1Eiaw3Ufs9yFWS XzAjNHBhd9LGznharnE/Ai0vqcY8IJJY4ocEKgKwU0REz0OuXQcPE8/S5MY4Yd815+ZabS VOcwHlvx9Mfep/MIh1CEXOCrS7HU1VpQuTRZ9jsOe2LWJl2J+bZ7R5/OH0BqpzosZA78+w Z3/opiSRM4McphMF9pormqk3MAegLnusKe4jbXrZVdv8/cPe7ZhmbYPtK3WsQEuuK5lqzY maAcL/U0oCmoe1YdrvgmU6YDhwrU4u2cGrpuboBxYMvDCT/lFCdfk+p56MKKTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697838877; a=rsa-sha256; cv=none; b=RF+y6ks5Szf9nUKiZSCbq1p99lJFSsPBc1Ns/O/BnEoVFON1xRiNxH/E1f02yYelFSAiPS n928s+YOufP0yIWnXLA7jgvMYsQnH0csxhKU2NbR0g/FHcPYrL9oWnxVuKR5GFaT66aIsR gqc7gXrJ6KpupxVBHtkAtxOTlyGjTHr0uY9XGLv5R2XvsQRvJ9qX6wjptPHFij4DLsXKos yK/KLhlvddRnWhCMQyE3jdN5N6pBN0QEJE0RmjrE/tYqwVUBukYOiG8V897htOrGnTGZzA IcLWr3BgAuQoztYNliQWPLXZDNQuYlKANXYOUpmL0BQx2p2h8IYh36OXnmFGbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697838877; 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=ddZfvzM7q3/TZhKHPPyMz33QHfqWZ4i2lPdg1CjwQf4=; b=GEvtWUUnFeoFD3zm/1mi/989rOkosckY9gZonq6DMAF+9sjPEAUyTOhh7LPpINfce0MjNS +RTl2dEwLqrm53SCzZa+RA6j+El2HEUvFCDfqlNxnjORDm/evSshlqMl9rqonvvhMSB+zp PoOUR1FYz6x5z0k4FhimK3yLd3QoNaSfto6sJ1uBiF00Ke5lFNC2JHKQUAP4X1Vt1B5pzW b6Lcw7E/UM+uZgR5tog6knmdXQ9n6mzuBnP1vLOpURJYV8Nox2DRmd9UBtjhD3FG4T8ATG oh3v+VBQcDcWojQOp5vWePjKxB2TDUDWuwKgNMlpaWOXDWxmmEZ6C8LtafIDCg== 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 4SByzd5b8jzpqQ; Fri, 20 Oct 2023 21:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39KLsbpO022112; Fri, 20 Oct 2023 21:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KLsb8e022109; Fri, 20 Oct 2023 21:54:37 GMT (envelope-from git) Date: Fri, 20 Oct 2023 21:54:37 GMT Message-Id: <202310202154.39KLsb8e022109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bfccb4a42979 - main - x86: Cosmetic cleanups to struct msi_intsrc 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bfccb4a429795954cfeca4ba60a07c0e1ec35e07 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bfccb4a429795954cfeca4ba60a07c0e1ec35e07 commit bfccb4a429795954cfeca4ba60a07c0e1ec35e07 Author: John Baldwin AuthorDate: 2023-10-20 21:53:05 +0000 Commit: John Baldwin CommitDate: 2023-10-20 21:53:05 +0000 x86: Cosmetic cleanups to struct msi_intsrc - Sort members by size. - Change msi_msix from a u_int to a bool. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D42305 --- sys/x86/x86/msi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/x86/x86/msi.c b/sys/x86/x86/msi.c index 246645efbc10..888635cba3f4 100644 --- a/sys/x86/x86/msi.c +++ b/sys/x86/x86/msi.c @@ -114,15 +114,15 @@ struct msi_intsrc { struct intsrc msi_intsrc; device_t msi_dev; /* Owning device. (g) */ struct msi_intsrc *msi_first; /* First source in group. */ + u_int *msi_irqs; /* Group's IRQ list. (g) */ u_int msi_irq; /* IRQ cookie. */ - u_int msi_msix; /* MSI-X message. */ - u_int msi_vector:8; /* IDT vector. */ u_int msi_cpu; /* Local APIC ID. (g) */ + u_int msi_remap_cookie; /* IOMMU cookie. */ + u_int msi_vector:8; /* IDT vector. */ u_int msi_count:8; /* Messages in this group. (g) */ u_int msi_maxcount:8; /* Alignment for this group. (g) */ u_int msi_enabled:8; /* Enabled messages in this group. (g) */ - u_int *msi_irqs; /* Group's IRQ list. (g) */ - u_int msi_remap_cookie; + bool msi_msix; /* MSI-X message. */ }; static void msi_create_source(void); @@ -277,7 +277,7 @@ msi_assign_cpu(struct intsrc *isrc, u_int apic_id) /* Allocate IDT vectors on this cpu. */ if (msi->msi_count > 1) { - KASSERT(msi->msi_msix == 0, ("MSI-X message group")); + KASSERT(!msi->msi_msix, ("MSI-X message group")); vector = apic_alloc_vectors(apic_id, msi->msi_irqs, msi->msi_count, msi->msi_maxcount); } else @@ -733,7 +733,7 @@ again: msi->msi_cpu = cpu; msi->msi_first = msi; msi->msi_vector = vector; - msi->msi_msix = 1; + msi->msi_msix = true; msi->msi_count = 1; msi->msi_maxcount = 1; msi->msi_irqs = NULL; @@ -775,7 +775,7 @@ msix_release(int irq) msi->msi_dev = NULL; apic_free_vector(msi->msi_cpu, msi->msi_vector, msi->msi_irq); msi->msi_vector = 0; - msi->msi_msix = 0; + msi->msi_msix = false; msi->msi_count = 0; msi->msi_maxcount = 0;