Date: Tue, 24 Oct 2023 19:25:58 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2574d1b43667 - stable/13 - x86: Cosmetic cleanups to struct msi_intsrc Message-ID: <202310241925.39OJPwdn074485@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2574d1b43667462ebd413c54cc57365d6d2b37f4 commit 2574d1b43667462ebd413c54cc57365d6d2b37f4 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-10-20 21:53:05 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-10-24 19:19:44 +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 (cherry picked from commit bfccb4a429795954cfeca4ba60a07c0e1ec35e07) --- 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310241925.39OJPwdn074485>