git: bfccb4a42979 - main - x86: Cosmetic cleanups to struct msi_intsrc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Oct 2023 21:54:37 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bfccb4a429795954cfeca4ba60a07c0e1ec35e07 commit bfccb4a429795954cfeca4ba60a07c0e1ec35e07 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-10-20 21:53:05 +0000 Commit: John Baldwin <jhb@FreeBSD.org> 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;