From: Thomas Gleixner <tglx@kernel.org>
To: "Vivian Wang" <wangruikang@iscas.ac.cn>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Creeley, Brett" <bcreeley@amd.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>
Cc: Han Gao <gaohan@iscas.ac.cn>,
Vivian Wang <wangruikang@iscas.ac.cn>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
netdev@vger.kernel.org, linux-pci@vger.kernel.org,
linux-sound@vger.kernel.org, linux-riscv@lists.infradead.org,
sophgo@lists.linux.dev, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH v3 1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask
Date: Tue, 27 Jan 2026 10:25:46 +0100 [thread overview]
Message-ID: <87o6mfbe5h.ffs@tglx> (raw)
In-Reply-To: <20260123-pci-msi-addr-mask-v3-1-9f9baa048524@iscas.ac.cn>
On Fri, Jan 23 2026 at 14:07, Vivian Wang wrote:
> Some PCI devices have PCI_MSI_FLAGS_64BIT in the MSI capability, but
> implement less than 64 address bits. This breaks on platforms where such
> a device is assigned an MSI address higher than what's reachable.
>
> Currently, we deal with this with a single no_64bit_msi flag, and
we don't deal with anything. The code has a single bit
limitation. Please use passive voice as documented.
> (notably on powerpc) forces 32-bit MSI address for these devices.
this is not a valid sentence.
> However, on some platforms the MSI doorbell address is above 32-bit but
> within device ability.
>
> As a first step to enabling MSI on those combinations of devices and
> platforms, conservatively generalize the single-bit flag no_64bit_msi
> into msi_addr_mask. (The name msi_addr_mask is chosen to avoid confusion
> with msi_mask.)
>
> The translation is essentially:
>
> - no_64bit_msi = 1 -> msi_addr_mask = DMA_BIT_MASK(32)
> - no_64bit_msi = 0 -> msi_addr_mask = DMA_BIT_MASK(64)
> - if (no_64bit_msi) -> if (msi_addr_mask < DMA_BIT_MASK(64))
>
> Since no values other than DMA_BIT_MASK(32) and DMA_BIT_MASK(64) is
s/is/are/
> used, no functional change is intended. Future patches that make use of
> intermediate values of msi_addr_mask will follow, allowing devices that
> cannot use full 64-bit addresses for MSI to work on platforms with MSI
> doorbell above 32-bit address space.
>
> Acked-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Other than those nits:
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@kernel.org>
To: "Vivian Wang" <wangruikang@iscas.ac.cn>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Creeley, Brett" <bcreeley@amd.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>
Cc: Han Gao <gaohan@iscas.ac.cn>,
Vivian Wang <wangruikang@iscas.ac.cn>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
netdev@vger.kernel.org, linux-pci@vger.kernel.org,
linux-sound@vger.kernel.org, linux-riscv@lists.infradead.org,
sophgo@lists.linux.dev, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH v3 1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask
Date: Tue, 27 Jan 2026 10:25:46 +0100 [thread overview]
Message-ID: <87o6mfbe5h.ffs@tglx> (raw)
In-Reply-To: <20260123-pci-msi-addr-mask-v3-1-9f9baa048524@iscas.ac.cn>
On Fri, Jan 23 2026 at 14:07, Vivian Wang wrote:
> Some PCI devices have PCI_MSI_FLAGS_64BIT in the MSI capability, but
> implement less than 64 address bits. This breaks on platforms where such
> a device is assigned an MSI address higher than what's reachable.
>
> Currently, we deal with this with a single no_64bit_msi flag, and
we don't deal with anything. The code has a single bit
limitation. Please use passive voice as documented.
> (notably on powerpc) forces 32-bit MSI address for these devices.
this is not a valid sentence.
> However, on some platforms the MSI doorbell address is above 32-bit but
> within device ability.
>
> As a first step to enabling MSI on those combinations of devices and
> platforms, conservatively generalize the single-bit flag no_64bit_msi
> into msi_addr_mask. (The name msi_addr_mask is chosen to avoid confusion
> with msi_mask.)
>
> The translation is essentially:
>
> - no_64bit_msi = 1 -> msi_addr_mask = DMA_BIT_MASK(32)
> - no_64bit_msi = 0 -> msi_addr_mask = DMA_BIT_MASK(64)
> - if (no_64bit_msi) -> if (msi_addr_mask < DMA_BIT_MASK(64))
>
> Since no values other than DMA_BIT_MASK(32) and DMA_BIT_MASK(64) is
s/is/are/
> used, no functional change is intended. Future patches that make use of
> intermediate values of msi_addr_mask will follow, allowing devices that
> cannot use full 64-bit addresses for MSI to work on platforms with MSI
> doorbell above 32-bit address space.
>
> Acked-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Other than those nits:
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-01-27 9:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 6:07 [PATCH v3 0/4] PCI/MSI: Generalize no_64bit_msi into msi_addr_mask Vivian Wang
2026-01-23 6:07 ` Vivian Wang
2026-01-23 6:07 ` [PATCH v3 1/4] PCI/MSI: Conservatively generalize " Vivian Wang
2026-01-23 6:07 ` Vivian Wang
2026-01-23 18:00 ` Creeley, Brett
2026-01-23 18:00 ` Creeley, Brett
2026-01-27 9:25 ` Thomas Gleixner [this message]
2026-01-27 9:25 ` Thomas Gleixner
2026-01-23 6:07 ` [PATCH v3 2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries() Vivian Wang
2026-01-23 6:07 ` Vivian Wang
2026-01-27 9:27 ` Thomas Gleixner
2026-01-27 9:27 ` Thomas Gleixner
2026-01-28 3:39 ` Vivian Wang
2026-01-28 3:39 ` Vivian Wang
2026-01-23 6:07 ` [PATCH v3 3/4] drm/radeon: Raise msi_addr_mask to dma_bits Vivian Wang
2026-01-23 6:07 ` Vivian Wang
2026-01-23 13:41 ` Christian König
2026-01-23 13:41 ` Christian König
2026-01-23 6:07 ` [PATCH v3 4/4] ALSA: hda/intel: " Vivian Wang
2026-01-23 6:07 ` Vivian Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o6mfbe5h.ffs@tglx \
--to=tglx@kernel.org \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrew+netdev@lunn.ch \
--cc=bcreeley@amd.com \
--cc=bhelgaas@google.com \
--cc=chleroy@kernel.org \
--cc=christian.koenig@amd.com \
--cc=davem@davemloft.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@google.com \
--cc=gaohan@iscas.ac.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=pabeni@redhat.com \
--cc=perex@perex.cz \
--cc=simona@ffwll.ch \
--cc=sophgo@lists.linux.dev \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
--cc=wangruikang@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.