From nobody Thu Jun 08 18:05:19 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 4QcXDv6QFfz4cFCY; Thu, 8 Jun 2023 18:05:19 +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 4QcXDv5qj8z3wfN; Thu, 8 Jun 2023 18:05:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686247519; 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=3xy72mmPNc01R4+Y0JVJLSiOqVZR8WnBm+G1h82Gknc=; b=alqaGz75TZ1c70FU3f/U9Nm9jh1szmTHeVsAVguQ1fJd7eHygKIVp0ZtKDO6hB/+CcPoJz 6F10c68xFHJbdwITZN/SgbbEwh0AKbAUZXsJh57770yHiaLU2n2aJUwujC6rXfKzZOLgH7 BsXyn5JHb7ptscc0FQwcICKgN97m9QhQVF/h97GotwMedswLna4lTevtyRm7jJogvQtwRm lTwGiY61i/XInvwh5AL5WoREoTFopVz0II4O6avKBrA5XsU/Jko3ymK09klNcxFuNkqonF g8mTRuzXSK49fqhJSVqtNyhvy+FqFk8jUOcpMK0MV/CsTgU9qmp/CY1fK3AGKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686247519; 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=3xy72mmPNc01R4+Y0JVJLSiOqVZR8WnBm+G1h82Gknc=; b=iXKbKkxgzIxS0UhcKaYfnwEdPMSmto364jF5XfKpCMg83LUjOnXCs3RkXbrAunrLRBlZe3 33X5AbsxMtSFVFf+Wed7C2NMieQ1WA/5llPGdqKMWU9JJNLhqM8F9TYryT5d8JH7EL9k7Z eRez+D0g+gW0IDYjPZK68CYLwflfnQrzByq44sfjxedHcIcTf2a4UhRJaO8U8db0O6574K huDSLCzhAg71V4uFB9TGycUiIwAA4sdOi8NuZa85xWbn5/7gERPtEMsYwRIkLH8+cPvN2W y3KPLw91XmjrmAojbke+c5hM5kjligGwbehl+OmU0A/XcEy+m1lwmkKJ/zgRig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686247519; a=rsa-sha256; cv=none; b=cQBnjI7EGaehTTtdEAgBKwB+ivUnI3pmyMj8WNHfW7Hj/oxcpUSM5MBhA9wf/k3sIhxxPY XIr1SEUMACy6p+zxH576MyP2LraHGoVKp0ju1k+ocg0VabUiveC/fpa7Vq+WeBtWyh3s1j WnJomL+mDJvsGHmy+vbTI+fvEICf50uhGkhAbD2WPNL4ZnAa/RHcnw2NpXB+RbGPehaCO9 oeWle8L+cVEXrhRbtBk+W6kFXsbTnReV1wMJSP8+NkNeLNNKqBw0QgeIO7jG9ZDbC4Hi8h pEfgKRQj6Ja2Tohybo+7jqrfuMAqlkFcy1PvfidvojQso6igBKpV7KiZPrxI/A== 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 4QcXDv4ttrz145q; Thu, 8 Jun 2023 18:05:19 +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 358I5JTc015903; Thu, 8 Jun 2023 18:05:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358I5JXp015902; Thu, 8 Jun 2023 18:05:19 GMT (envelope-from git) Date: Thu, 8 Jun 2023 18:05:19 GMT Message-Id: <202306081805.358I5JXp015902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 17bde9cbc6fc - main - LinuxKPI: pci: update struct msi_desc 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17bde9cbc6fc3ac219aa11243c0b75025786f628 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=17bde9cbc6fc3ac219aa11243c0b75025786f628 commit 17bde9cbc6fc3ac219aa11243c0b75025786f628 Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:48:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-08 18:04:35 +0000 LinuxKPI: pci: update struct msi_desc It seems struct msi_desc is setup differently (or was changed) compared to how we added it a while ago. Catch up in order to keep drivers directly accessing fields compiling. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40175 --- sys/compat/linuxkpi/common/include/linux/pci.h | 8 ++++++-- sys/compat/linuxkpi/common/src/linux_pci.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 263dc41377cc..6891f8878534 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -295,13 +295,17 @@ struct msi_msg { uint32_t data; }; -struct msi_desc { - struct msi_msg msg; +struct pci_msi_desc { struct { bool is_64; } msi_attrib; }; +struct msi_desc { + struct msi_msg msg; + struct pci_msi_desc pci; +}; + /* * If we find drivers accessing this from multiple KPIs we may have to * refcount objects of this structure. diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 0d9b2827365f..5f4ce077a011 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1009,7 +1009,7 @@ lkpi_pci_msi_desc_alloc(int irq) desc = malloc(sizeof(*desc), M_DEVBUF, M_WAITOK | M_ZERO); - desc->msi_attrib.is_64 = + desc->pci.msi_attrib.is_64 = (msi->msi_ctrl & PCIM_MSICTRL_64BIT) ? true : false; desc->msg.data = msi->msi_data;