From nobody Tue Oct 24 19:26:02 2023 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 4SFMVM275jz4yPnX; Tue, 24 Oct 2023 19:26:03 +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 4SFMVL63jRz4Nhl; Tue, 24 Oct 2023 19:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698175562; 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=PODUC+AkTCKlvaLLv545pvQuiP7C0KHLr9n8UX9FjJE=; b=qtQEcf2lfNm3NEv9B9k8CCpHQEr3/2IImg9ZALPAkiMbyDZE0qfwxhnQkSqBKyJNnWetto hwbBU+Ht+o7SndcEvh8X7X63RXk9BbxdCnxO/fPryLNk1kkdlvpuIS2HBMTZwiCw3BLQs0 5ttpUP/aIJeqHAJgsjRz2lDMUrq+zYaOC7Xx/iq257iEL6qTxgA0KnVIhq7/n3eujcXW7U smEq2jSwYo03AyywJO57B6yx3HmvfJQUDiH7a8oXDGH3ec8IvjSf34w77PY01IIoTSiU28 fpwGSTmny5TyeXE/th8dpj5J9XpJR3q5U2g5gR4EcUH+H8ikxoJcBLwhdlmQdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698175562; a=rsa-sha256; cv=none; b=ryOBmEq2dTDBfeSL0oVpWHoOfux/bLVrP6t0swUIJhJ7ykYZvflBCfo6aeTp51q7abEutU nA2L3pUZVMALtolz35Vm7gxzX9K0yK/jN12/Zxr2BZAq6NKqEUpaXzcGGz/4f0hjgzRqNA uZ33UVbJziFVwY4GJuibj1CRF4jKgP+MoX9VPflWXl37zHU40W3WrmmoPLpwrT2owTsSmr NMnbZVUM7W1M/IS2gCs55rUoCplHtG2UqfnoX/SIbyiJmyLw5nY+7Si/hHHcBT7Mp+9TG1 BnLyP0XYjMnrr94YlbMlIGOHlaYFy6ODsFVEy1Oy8gaAM7ugDbO9rmLWtcjqIg== 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=1698175562; 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=PODUC+AkTCKlvaLLv545pvQuiP7C0KHLr9n8UX9FjJE=; b=jBjk3jvHwy2C3mIQP3F/0Qh6n45HXZuLcMYuhMtxXBoFiWPNNP3frlUMgUVJ+1fd+6e/kk JwLYtDkoVjQoprzA1VDvApDdTr6yJGAVGDKruY8qZC8NFMjSuYVGnJvOmvgpQGhYwWLChq q+WNMhfmtVBiUZLmxIwqbB8TYKillO2JKycSpWY72Kd5trVTHm9z3LxBJgtX7HeZQkdKA/ xlxultLDAGPAIA50m6SwzprHNO7uImLpHbFKEck1RTEGIkXTKS6WhVIvy8LccvjTjsZq1e JCKwI2Cw7M4dXwyVJEQH//kPjw0G6Jt0eSPJVAK2UpTl85W+D7XqdfUJl7Pb7w== 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 4SFMVL5871zb5x; Tue, 24 Oct 2023 19:26:02 +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 39OJQ2Ug074780; Tue, 24 Oct 2023 19:26:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OJQ2Km074777; Tue, 24 Oct 2023 19:26:02 GMT (envelope-from git) Date: Tue, 24 Oct 2023 19:26:02 GMT Message-Id: <202310241926.39OJQ2Km074777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 89160477956b - stable/14 - x86: Cosmetic cleanups to struct msi_intsrc 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 89160477956bf3dff2faa7eeedd0d67fb7a60efe Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=89160477956bf3dff2faa7eeedd0d67fb7a60efe commit 89160477956bf3dff2faa7eeedd0d67fb7a60efe Author: John Baldwin AuthorDate: 2023-10-20 21:53:05 +0000 Commit: John Baldwin CommitDate: 2023-10-24 19:19:41 +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;