[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o6mfbe5h.ffs@tglx>
Date: Tue, 27 Jan 2026 10:25:46 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: Vivian Wang <wangruikang@...as.ac.cn>, Madhavan Srinivasan
<maddy@...ux.ibm.com>, Michael Ellerman <mpe@...erman.id.au>, Nicholas
Piggin <npiggin@...il.com>, "Christophe Leroy (CS GROUP)"
<chleroy@...nel.org>, Alex Deucher <alexander.deucher@....com>, Christian
König <christian.koenig@....com>, David Airlie
<airlied@...il.com>, Simona
Vetter <simona@...ll.ch>, "Creeley, Brett" <bcreeley@....com>, Andrew Lunn
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
Abeni <pabeni@...hat.com>, Bjorn Helgaas <bhelgaas@...gle.com>, Jaroslav
Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc: Han Gao <gaohan@...as.ac.cn>, Vivian Wang <wangruikang@...as.ac.cn>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
netdev@...r.kernel.org, linux-pci@...r.kernel.org,
linux-sound@...r.kernel.org, linux-riscv@...ts.infradead.org,
sophgo@...ts.linux.dev, Takashi Iwai <tiwai@...e.de>
Subject: Re: [PATCH v3 1/4] PCI/MSI: Conservatively generalize no_64bit_msi
into msi_addr_mask
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@...e.de>
> Signed-off-by: Vivian Wang <wangruikang@...as.ac.cn>
Other than those nits:
Reviewed-by: Thomas Gleixner <tglx@...nel.org>
Powered by blists - more mailing lists