* [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems
@ 2026-02-20 7:02 Nilay Shroff
2026-02-20 7:02 ` [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices Nilay Shroff
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Nilay Shroff @ 2026-02-20 7:02 UTC (permalink / raw)
To: linuxppc-dev, linux-pci, sparclinux
Cc: wangruikang, tglx, maddy, mpe, npiggin, chleroy, gjoyce, helgaas,
davem, andreas, Nilay Shroff
Hi,
Recent changes [1] which replaced pci_dev::no_64bit_msi with pci_dev::
msi_addr_mask inadvertently missed to initialize the pci_dev::msi_addr_mask
to the DMA_BIT_MASK(64) on powerpc platform. Due to this, later the
validation the programmed MSI address against the msi_addr_mask fails.
This causes pci device probe method failures on powerpc platform. We also
realized that similar issue could potentially happen on sparc system as
well. So this series initializes pci_dev::msi_addr_mask to DMA_BIT_MASK(64)
when pci_dev is instantiated for both powerpc and sparc platforms.
The first patch in the series fixes this on powerpc platform. The second
patch fixes this issue on sparc platform. Please note that as I don't have
access to the sparc platform, this patch was only compile tested on the
sparc system. Anyone from the community is welcome to test it who has
access to the sparc machine.
[1] https://lore.kernel.org/all/20260129-pci-msi-addr-mask-v4-0-70da998f2750@iscas.ac.cn/
Changes since v1:
- Initialize the pci_dev:msi_addr_mask on sparc platform (Vivian Wang)
- Some minor cosmetic fixes (Bjorn Helgaas)
Nilay Shroff (2):
powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
arch/sparc/kernel/pci.c | 7 +++++++
2 files changed, 14 insertions(+)
--
2.52.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
2026-02-20 7:02 [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Nilay Shroff
@ 2026-02-20 7:02 ` Nilay Shroff
2026-02-22 10:46 ` Venkat
2026-03-01 6:59 ` Nam Cao
2026-02-20 7:02 ` [PATCHv2 2/2] sparc/pci: " Nilay Shroff
` (3 subsequent siblings)
4 siblings, 2 replies; 13+ messages in thread
From: Nilay Shroff @ 2026-02-20 7:02 UTC (permalink / raw)
To: linuxppc-dev, linux-pci, sparclinux
Cc: wangruikang, tglx, maddy, mpe, npiggin, chleroy, gjoyce, helgaas,
davem, andreas, Nilay Shroff
Recent changes replaced the use of no_64bit_msi with msi_addr_mask.
As a result, msi_addr_mask is now expected to be initialized to
DMA_BIT_MASK(64) when a pci_dev is set up. However, this initialization
was missed on powerpc due to differences in the device initialization
path compared to other (x86) architecture. Due to this, now PCI device
probe method fails on powerpc system.
On powerpc systems, struct pci_dev instances are created from device
tree nodes via of_create_pci_dev(). Because msi_addr_mask was not
initialized there, it remained zero. Later, during MSI setup,
msi_verify_entries() validates the programmed MSI address against
pdev->msi_addr_mask. Since the mask was not set correctly, the
validation fails, causing PCI driver probe failures for devices on
powerpc systems.
Initialize pdev->msi_addr_mask to DMA_BIT_MASK(64) in
of_create_pci_dev() so that MSI address validation succeeds and device
probe works as expected.
Fixes: 386ced19e9a3 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
---
arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 756043dd06e9..fb9fbf0d1796 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -212,6 +212,13 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
dev->error_state = pci_channel_io_normal;
dev->dma_mask = 0xffffffff;
+ /*
+ * Assume 64-bit addresses for MSI initially. Will be changed to 32-bit
+ * if MSI (rather than MSI-X) capability does not have
+ * PCI_MSI_FLAGS_64BIT. Can also be overridden by driver.
+ */
+ dev->msi_addr_mask = DMA_BIT_MASK(64);
+
/* Early fixups, before probing the BARs */
pci_fixup_device(pci_fixup_early, dev);
--
2.52.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv2 2/2] sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
2026-02-20 7:02 [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Nilay Shroff
2026-02-20 7:02 ` [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices Nilay Shroff
@ 2026-02-20 7:02 ` Nilay Shroff
2026-02-21 16:36 ` Han Gao
2026-02-20 10:14 ` [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Vivian Wang
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Nilay Shroff @ 2026-02-20 7:02 UTC (permalink / raw)
To: linuxppc-dev, linux-pci, sparclinux
Cc: wangruikang, tglx, maddy, mpe, npiggin, chleroy, gjoyce, helgaas,
davem, andreas, Nilay Shroff
Recent changes replaced the use of no_64bit_msi with msi_addr_mask,
which is now expected to be initialized to DMA_BIT_MASK(64) during PCI
device setup. On SPARC systems, this initialization was inadvertently
missed for devices instantiated from device tree nodes, leaving
msi_addr_mask unset for OF-created pci_dev instances. As a result,
MSI address validation fails during probe, causing affected devices
to fail initialization.
Initialize pdev->msi_addr_mask to DMA_BIT_MASK(64) in
of_create_pci_dev() so that MSI address validation succeeds and PCI
device probing works as expected.
Fixes: 386ced19e9a3 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
---
arch/sparc/kernel/pci.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index b290107170e9..a4815d544781 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -355,6 +355,13 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
dev->error_state = pci_channel_io_normal;
dev->dma_mask = 0xffffffff;
+ /*
+ * Assume 64-bit addresses for MSI initially. Will be changed to 32-bit
+ * if MSI (rather than MSI-X) capability does not have
+ * PCI_MSI_FLAGS_64BIT. Can also be overridden by driver.
+ */
+ dev->msi_addr_mask = DMA_BIT_MASK(64);
+
if (of_node_name_eq(node, "pci")) {
/* a PCI-PCI bridge */
dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
--
2.52.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems
2026-02-20 7:02 [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Nilay Shroff
2026-02-20 7:02 ` [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices Nilay Shroff
2026-02-20 7:02 ` [PATCHv2 2/2] sparc/pci: " Nilay Shroff
@ 2026-02-20 10:14 ` Vivian Wang
2026-02-20 13:15 ` John Paul Adrian Glaubitz
2026-02-27 16:44 ` Bjorn Helgaas
2026-03-02 23:07 ` Bjorn Helgaas
4 siblings, 1 reply; 13+ messages in thread
From: Vivian Wang @ 2026-02-20 10:14 UTC (permalink / raw)
To: Nilay Shroff, linuxppc-dev, linux-pci, sparclinux
Cc: tglx, maddy, mpe, npiggin, chleroy, gjoyce, helgaas, davem,
andreas
Hi Nilay,
On 2/20/26 15:02, Nilay Shroff wrote:
> Hi,
>
> Recent changes [1] which replaced pci_dev::no_64bit_msi with pci_dev::
> msi_addr_mask inadvertently missed to initialize the pci_dev::msi_addr_mask
> to the DMA_BIT_MASK(64) on powerpc platform. Due to this, later the
> validation the programmed MSI address against the msi_addr_mask fails.
> This causes pci device probe method failures on powerpc platform. We also
> realized that similar issue could potentially happen on sparc system as
> well. So this series initializes pci_dev::msi_addr_mask to DMA_BIT_MASK(64)
> when pci_dev is instantiated for both powerpc and sparc platforms.
>
> The first patch in the series fixes this on powerpc platform. The second
> patch fixes this issue on sparc platform. Please note that as I don't have
> access to the sparc platform, this patch was only compile tested on the
> sparc system. Anyone from the community is welcome to test it who has
> access to the sparc machine.
>
> [1] https://lore.kernel.org/all/20260129-pci-msi-addr-mask-v4-0-70da998f2750@iscas.ac.cn/
>
> Changes since v1:
> - Initialize the pci_dev:msi_addr_mask on sparc platform (Vivian Wang)
> - Some minor cosmetic fixes (Bjorn Helgaas)
>
> Nilay Shroff (2):
> powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
> sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
>
> arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
> arch/sparc/kernel/pci.c | 7 +++++++
> 2 files changed, 14 insertions(+)
This series is:
Reviewed-by: Vivian Wang <wangruikang@iscas.ac.cn>
With the caveat that I have neither powerpc nor sparc machines to test,
so it really is only reviewed.
Thanks and with apologies,
Vivian "dramforever" Wang
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems
2026-02-20 10:14 ` [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Vivian Wang
@ 2026-02-20 13:15 ` John Paul Adrian Glaubitz
0 siblings, 0 replies; 13+ messages in thread
From: John Paul Adrian Glaubitz @ 2026-02-20 13:15 UTC (permalink / raw)
To: Vivian Wang, Nilay Shroff, linuxppc-dev, linux-pci, sparclinux
Cc: tglx, maddy, mpe, npiggin, chleroy, gjoyce, helgaas, davem,
andreas
Hi,
On Fri, 2026-02-20 at 18:14 +0800, Vivian Wang wrote:
> Hi Nilay,
>
> On 2/20/26 15:02, Nilay Shroff wrote:
>
> > Hi,
> >
> > Recent changes [1] which replaced pci_dev::no_64bit_msi with pci_dev::
> > msi_addr_mask inadvertently missed to initialize the pci_dev::msi_addr_mask
> > to the DMA_BIT_MASK(64) on powerpc platform. Due to this, later the
> > validation the programmed MSI address against the msi_addr_mask fails.
> > This causes pci device probe method failures on powerpc platform. We also
> > realized that similar issue could potentially happen on sparc system as
> > well. So this series initializes pci_dev::msi_addr_mask to DMA_BIT_MASK(64)
> > when pci_dev is instantiated for both powerpc and sparc platforms.
> >
> > The first patch in the series fixes this on powerpc platform. The second
> > patch fixes this issue on sparc platform. Please note that as I don't have
> > access to the sparc platform, this patch was only compile tested on the
> > sparc system. Anyone from the community is welcome to test it who has
> > access to the sparc machine.
> >
> > [1] https://lore.kernel.org/all/20260129-pci-msi-addr-mask-v4-0-70da998f2750@iscas.ac.cn/
> >
> > Changes since v1:
> > - Initialize the pci_dev:msi_addr_mask on sparc platform (Vivian Wang)
> > - Some minor cosmetic fixes (Bjorn Helgaas)
> >
> > Nilay Shroff (2):
> > powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
> > sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
> >
> > arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
> > arch/sparc/kernel/pci.c | 7 +++++++
> > 2 files changed, 14 insertions(+)
>
> This series is:
>
> Reviewed-by: Vivian Wang <wangruikang@iscas.ac.cn>
>
> With the caveat that I have neither powerpc nor sparc machines to test,
> so it really is only reviewed.
Then please make sure that the changes have been tested on actual hardware.
We've seen some regressions with changes on SPARC that went in without testing.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 2/2] sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
2026-02-20 7:02 ` [PATCHv2 2/2] sparc/pci: " Nilay Shroff
@ 2026-02-21 16:36 ` Han Gao
2026-02-22 6:01 ` Nathaniel Roach
0 siblings, 1 reply; 13+ messages in thread
From: Han Gao @ 2026-02-21 16:36 UTC (permalink / raw)
To: Nilay Shroff
Cc: Han Gao, linuxppc-dev, linux-pci, sparclinux, wangruikang, tglx,
maddy, mpe, npiggin, chleroy, gjoyce, helgaas, davem, andreas,
Han Gao (Revy)
Tested and passed on SPARC Enterprise T5220.
Without this patch, the e1000e would use intx.
Tested-by: Han Gao <gaohan@iscas.ac.cn <mailto:gaohan@iscas.ac.cn>> # on SPARC Enterprise T5220
> On Feb 20, 2026, at 15:02, Nilay Shroff <nilay@linux.ibm.com> wrote:
>
> Recent changes replaced the use of no_64bit_msi with msi_addr_mask,
> which is now expected to be initialized to DMA_BIT_MASK(64) during PCI
> device setup. On SPARC systems, this initialization was inadvertently
> missed for devices instantiated from device tree nodes, leaving
> msi_addr_mask unset for OF-created pci_dev instances. As a result,
> MSI address validation fails during probe, causing affected devices
> to fail initialization.
>
> Initialize pdev->msi_addr_mask to DMA_BIT_MASK(64) in
> of_create_pci_dev() so that MSI address validation succeeds and PCI
> device probing works as expected.
>
> Fixes: 386ced19e9a3 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
> arch/sparc/kernel/pci.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
> index b290107170e9..a4815d544781 100644
> --- a/arch/sparc/kernel/pci.c
> +++ b/arch/sparc/kernel/pci.c
> @@ -355,6 +355,13 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
> dev->error_state = pci_channel_io_normal;
> dev->dma_mask = 0xffffffff;
>
> + /*
> + * Assume 64-bit addresses for MSI initially. Will be changed to 32-bit
> + * if MSI (rather than MSI-X) capability does not have
> + * PCI_MSI_FLAGS_64BIT. Can also be overridden by driver.
> + */
> + dev->msi_addr_mask = DMA_BIT_MASK(64);
> +
> if (of_node_name_eq(node, "pci")) {
> /* a PCI-PCI bridge */
> dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
> --
> 2.52.0
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 2/2] sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
2026-02-21 16:36 ` Han Gao
@ 2026-02-22 6:01 ` Nathaniel Roach
0 siblings, 0 replies; 13+ messages in thread
From: Nathaniel Roach @ 2026-02-22 6:01 UTC (permalink / raw)
To: Han Gao, Nilay Shroff
Cc: linuxppc-dev, linux-pci, sparclinux, wangruikang, tglx, maddy,
mpe, npiggin, chleroy, gjoyce, helgaas, davem, andreas,
Han Gao (Revy)
On 22/2/26 00:36, Han Gao wrote:
> Tested and passed on SPARC Enterprise T5220.
>
> Without this patch, the e1000e would use intx.
>
> Tested-by: Han Gao <gaohan@iscas.ac.cn <mailto:gaohan@iscas.ac.cn>> # on SPARC Enterprise T5220
>
>> On Feb 20, 2026, at 15:02, Nilay Shroff <nilay@linux.ibm.com> wrote:
>>
>> Recent changes replaced the use of no_64bit_msi with msi_addr_mask,
>> which is now expected to be initialized to DMA_BIT_MASK(64) during PCI
>> device setup. On SPARC systems, this initialization was inadvertently
>> missed for devices instantiated from device tree nodes, leaving
>> msi_addr_mask unset for OF-created pci_dev instances. As a result,
>> MSI address validation fails during probe, causing affected devices
>> to fail initialization.
>>
>> Initialize pdev->msi_addr_mask to DMA_BIT_MASK(64) in
>> of_create_pci_dev() so that MSI address validation succeeds and PCI
>> device probing works as expected.
>>
>> Fixes: 386ced19e9a3 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
>> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
>> ---
>> arch/sparc/kernel/pci.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
>> index b290107170e9..a4815d544781 100644
>> --- a/arch/sparc/kernel/pci.c
>> +++ b/arch/sparc/kernel/pci.c
>> @@ -355,6 +355,13 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
>> dev->error_state = pci_channel_io_normal;
>> dev->dma_mask = 0xffffffff;
>>
>> + /*
>> + * Assume 64-bit addresses for MSI initially. Will be changed to 32-bit
>> + * if MSI (rather than MSI-X) capability does not have
>> + * PCI_MSI_FLAGS_64BIT. Can also be overridden by driver.
>> + */
>> + dev->msi_addr_mask = DMA_BIT_MASK(64);
>> +
>> if (of_node_name_eq(node, "pci")) {
>> /* a PCI-PCI bridge */
>> dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
>> --
>> 2.52.0
Tested-by: Nathaniel Roach <nroach44@nroach44.id.au> # SPARC T5-2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
2026-02-20 7:02 ` [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices Nilay Shroff
@ 2026-02-22 10:46 ` Venkat
2026-03-01 6:59 ` Nam Cao
1 sibling, 0 replies; 13+ messages in thread
From: Venkat @ 2026-02-22 10:46 UTC (permalink / raw)
To: Nilay Shroff
Cc: linuxppc-dev, linux-pci, sparclinux, wangruikang, tglx, maddy,
mpe, npiggin, chleroy, gjoyce, helgaas, davem, andreas
> On 20 Feb 2026, at 12:32 PM, Nilay Shroff <nilay@linux.ibm.com> wrote:
>
> Recent changes replaced the use of no_64bit_msi with msi_addr_mask.
> As a result, msi_addr_mask is now expected to be initialized to
> DMA_BIT_MASK(64) when a pci_dev is set up. However, this initialization
> was missed on powerpc due to differences in the device initialization
> path compared to other (x86) architecture. Due to this, now PCI device
> probe method fails on powerpc system.
>
> On powerpc systems, struct pci_dev instances are created from device
> tree nodes via of_create_pci_dev(). Because msi_addr_mask was not
> initialized there, it remained zero. Later, during MSI setup,
> msi_verify_entries() validates the programmed MSI address agains
> pdev->msi_addr_mask. Since the mask was not set correctly, the
> validation fails, causing PCI driver probe failures for devices on
> powerpc systems.
>
> Initialize pdev->msi_addr_mask to DMA_BIT_MASK(64) in
> of_create_pci_dev() so that MSI address validation succeeds and device
> probe works as expected.
>
> Fixes: 386ced19e9a3 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
> arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
> index 756043dd06e9..fb9fbf0d1796 100644
> --- a/arch/powerpc/kernel/pci_of_scan.c
> +++ b/arch/powerpc/kernel/pci_of_scan.c
> @@ -212,6 +212,13 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
> dev->error_state = pci_channel_io_normal;
> dev->dma_mask = 0xffffffff;
>
> + /*
> + * Assume 64-bit addresses for MSI initially. Will be changed to 32-bit
> + * if MSI (rather than MSI-X) capability does not have
> + * PCI_MSI_FLAGS_64BIT. Can also be overridden by driver.
> + */
> + dev->msi_addr_mask = DMA_BIT_MASK(64);
> +
> /* Early fixups, before probing the BARs */
> pci_fixup_device(pci_fixup_early, dev);
>
> --
> 2.52.0
>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Tested on an IBM Power System LPAR (pseries).
On an unpatched kernel, all LPFC functions failed MSI/MSI-X setup with:
[ 0.175139] Running MSI bitmap self-tests ...
[ 1.521630] lpfc 0152:60:00.0: arch assigned 64-bit MSI address 0xffff3840 above device MSI address mask 0x0
[ 1.536203] lpfc 0152:60:00.0: arch assigned 64-bit MSI address 0xffff3a00 above device MSI address mask 0x0
[ 1.536318] lpfc 0152:60:00.0: 14: [ 1.521874] 0:0484 PCI enable MSI-X failed (-5)
[ 1.536321] lpfc 0152:60:00.0: 15: [ 1.536251] 0:0488 PCI enable MSI mode failed (-5)
After applying this patch, lpfc driver probe completes successfully and
MSI/MSI-X setup works normally.
[ 0.206925] Running MSI bitmap self-tests ...
[ 3.040737] lpfc 0152:60:00.1: 1:3238 Reducing IO channels to match number of MSI-X vectors, requested 32 got 2
[ 4.162067] lpfc 0152:60:00.2: 2:3238 Reducing IO channels to match number of MSI-X vectors, requested 32 got 1
[ 5.270672] lpfc 0152:60:00.3: 3:3238 Reducing IO channels to match number of MSI-X vectors, requested 32 got 1
Regards,
Venkat.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems
2026-02-20 7:02 [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Nilay Shroff
` (2 preceding siblings ...)
2026-02-20 10:14 ` [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Vivian Wang
@ 2026-02-27 16:44 ` Bjorn Helgaas
2026-03-03 4:29 ` Madhavan Srinivasan
2026-03-02 23:07 ` Bjorn Helgaas
4 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2026-02-27 16:44 UTC (permalink / raw)
To: Nilay Shroff, Madhavan Srinivasan, Michael Ellerman,
David S. Miller, Andreas Larsson, John Paul Adrian Glaubitz
Cc: linuxppc-dev, linux-pci, sparclinux, wangruikang, tglx, npiggin,
chleroy, gjoyce
[cc->to powerpc, sparc maintainers for ack]
On Fri, Feb 20, 2026 at 12:32:26PM +0530, Nilay Shroff wrote:
> Hi,
>
> Recent changes [1] which replaced pci_dev::no_64bit_msi with pci_dev::
> msi_addr_mask inadvertently missed to initialize the pci_dev::msi_addr_mask
> to the DMA_BIT_MASK(64) on powerpc platform. Due to this, later the
> validation the programmed MSI address against the msi_addr_mask fails.
> This causes pci device probe method failures on powerpc platform. We also
> realized that similar issue could potentially happen on sparc system as
> well. So this series initializes pci_dev::msi_addr_mask to DMA_BIT_MASK(64)
> when pci_dev is instantiated for both powerpc and sparc platforms.
>
> The first patch in the series fixes this on powerpc platform. The second
> patch fixes this issue on sparc platform. Please note that as I don't have
> access to the sparc platform, this patch was only compile tested on the
> sparc system. Anyone from the community is welcome to test it who has
> access to the sparc machine.
>
> [1] https://lore.kernel.org/all/20260129-pci-msi-addr-mask-v4-0-70da998f2750@iscas.ac.cn/
>
> Changes since v1:
> - Initialize the pci_dev:msi_addr_mask on sparc platform (Vivian Wang)
> - Some minor cosmetic fixes (Bjorn Helgaas)
>
> Nilay Shroff (2):
> powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
> sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
>
> arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
> arch/sparc/kernel/pci.c | 7 +++++++
> 2 files changed, 14 insertions(+)
These fix regressions on powerpc and sparc caused by 386ced19e9a3
("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address
mask").
These fixes have been tested by Han Gao (SPARC Enterprise T5220),
Nathaniel Roach (SPARC T5-2), and Venkat Rao Bagalkote (IBM Power
System LPAR (pseries)).
It'd be great to have acks from the powerpc and sparc folks so they
could be merged either by Thomas (who merged 386ced19e9a3) or me (via
PCI tree).
Bjorn
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
2026-02-20 7:02 ` [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices Nilay Shroff
2026-02-22 10:46 ` Venkat
@ 2026-03-01 6:59 ` Nam Cao
1 sibling, 0 replies; 13+ messages in thread
From: Nam Cao @ 2026-03-01 6:59 UTC (permalink / raw)
To: Nilay Shroff, linuxppc-dev, linux-pci, sparclinux
Cc: wangruikang, tglx, maddy, mpe, npiggin, chleroy, gjoyce, helgaas,
davem, andreas, Nilay Shroff
Nilay Shroff <nilay@linux.ibm.com> writes:
> Recent changes replaced the use of no_64bit_msi with msi_addr_mask.
> As a result, msi_addr_mask is now expected to be initialized to
> DMA_BIT_MASK(64) when a pci_dev is set up. However, this initialization
> was missed on powerpc due to differences in the device initialization
> path compared to other (x86) architecture. Due to this, now PCI device
> probe method fails on powerpc system.
>
> On powerpc systems, struct pci_dev instances are created from device
> tree nodes via of_create_pci_dev(). Because msi_addr_mask was not
> initialized there, it remained zero. Later, during MSI setup,
> msi_verify_entries() validates the programmed MSI address against
> pdev->msi_addr_mask. Since the mask was not set correctly, the
> validation fails, causing PCI driver probe failures for devices on
> powerpc systems.
>
> Initialize pdev->msi_addr_mask to DMA_BIT_MASK(64) in
> of_create_pci_dev() so that MSI address validation succeeds and device
> probe works as expected.
>
> Fixes: 386ced19e9a3 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
I ran into this problem today. Great that it's already been fixed.
Reviewed-by: Nam Cao <namcao@linutronix.de>
Tested-by: Nam Cao <namcao@linutronix.de>
Nam
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems
2026-02-20 7:02 [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Nilay Shroff
` (3 preceding siblings ...)
2026-02-27 16:44 ` Bjorn Helgaas
@ 2026-03-02 23:07 ` Bjorn Helgaas
4 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2026-03-02 23:07 UTC (permalink / raw)
To: Nilay Shroff
Cc: linuxppc-dev, linux-pci, sparclinux, wangruikang, tglx, maddy,
mpe, npiggin, chleroy, gjoyce, davem, andreas,
John Paul Adrian Glaubitz, Han Gao, Nathaniel Roach, Venkat,
Nam Cao
On Fri, Feb 20, 2026 at 12:32:26PM +0530, Nilay Shroff wrote:
> Hi,
>
> Recent changes [1] which replaced pci_dev::no_64bit_msi with pci_dev::
> msi_addr_mask inadvertently missed to initialize the pci_dev::msi_addr_mask
> to the DMA_BIT_MASK(64) on powerpc platform. Due to this, later the
> validation the programmed MSI address against the msi_addr_mask fails.
> This causes pci device probe method failures on powerpc platform. We also
> realized that similar issue could potentially happen on sparc system as
> well. So this series initializes pci_dev::msi_addr_mask to DMA_BIT_MASK(64)
> when pci_dev is instantiated for both powerpc and sparc platforms.
>
> The first patch in the series fixes this on powerpc platform. The second
> patch fixes this issue on sparc platform. Please note that as I don't have
> access to the sparc platform, this patch was only compile tested on the
> sparc system. Anyone from the community is welcome to test it who has
> access to the sparc machine.
>
> [1] https://lore.kernel.org/all/20260129-pci-msi-addr-mask-v4-0-70da998f2750@iscas.ac.cn/
>
> Changes since v1:
> - Initialize the pci_dev:msi_addr_mask on sparc platform (Vivian Wang)
> - Some minor cosmetic fixes (Bjorn Helgaas)
>
> Nilay Shroff (2):
> powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
> sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
>
> arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
> arch/sparc/kernel/pci.c | 7 +++++++
> 2 files changed, 14 insertions(+)
I applied both of these to pci/for-linus for v7.0 since they fix
regressions.
Thanks to Han and Nathaniel for testing on sparc and Venkat and Nam
for testing on powerpc.
Let me know if you have issues with these or prefer to merge via
another tree; I'll be happy to drop.
Bjorn
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems
2026-02-27 16:44 ` Bjorn Helgaas
@ 2026-03-03 4:29 ` Madhavan Srinivasan
2026-03-03 16:30 ` Bjorn Helgaas
0 siblings, 1 reply; 13+ messages in thread
From: Madhavan Srinivasan @ 2026-03-03 4:29 UTC (permalink / raw)
To: Bjorn Helgaas, Nilay Shroff, Michael Ellerman, David S. Miller,
Andreas Larsson, John Paul Adrian Glaubitz
Cc: linuxppc-dev, linux-pci, sparclinux, wangruikang, tglx, npiggin,
chleroy, gjoyce
On 2/27/26 10:14 PM, Bjorn Helgaas wrote:
> [cc->to powerpc, sparc maintainers for ack]
>
> On Fri, Feb 20, 2026 at 12:32:26PM +0530, Nilay Shroff wrote:
>> Hi,
>>
>> Recent changes [1] which replaced pci_dev::no_64bit_msi with pci_dev::
>> msi_addr_mask inadvertently missed to initialize the pci_dev::msi_addr_mask
>> to the DMA_BIT_MASK(64) on powerpc platform. Due to this, later the
>> validation the programmed MSI address against the msi_addr_mask fails.
>> This causes pci device probe method failures on powerpc platform. We also
>> realized that similar issue could potentially happen on sparc system as
>> well. So this series initializes pci_dev::msi_addr_mask to DMA_BIT_MASK(64)
>> when pci_dev is instantiated for both powerpc and sparc platforms.
>>
>> The first patch in the series fixes this on powerpc platform. The second
>> patch fixes this issue on sparc platform. Please note that as I don't have
>> access to the sparc platform, this patch was only compile tested on the
>> sparc system. Anyone from the community is welcome to test it who has
>> access to the sparc machine.
>>
>> [1] https://lore.kernel.org/all/20260129-pci-msi-addr-mask-v4-0-70da998f2750@iscas.ac.cn/
>>
>> Changes since v1:
>> - Initialize the pci_dev:msi_addr_mask on sparc platform (Vivian Wang)
>> - Some minor cosmetic fixes (Bjorn Helgaas)
>>
>> Nilay Shroff (2):
>> powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
>> sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
>>
>> arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
>> arch/sparc/kernel/pci.c | 7 +++++++
>> 2 files changed, 14 insertions(+)
> These fix regressions on powerpc and sparc caused by 386ced19e9a3
> ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address
> mask").
>
> These fixes have been tested by Han Gao (SPARC Enterprise T5220),
> Nathaniel Roach (SPARC T5-2), and Venkat Rao Bagalkote (IBM Power
> System LPAR (pseries)).
>
> It'd be great to have acks from the powerpc and sparc folks so they
Sorry for the delayed response, yes we tested this from our end.
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
> could be merged either by Thomas (who merged 386ced19e9a3) or me (via
> PCI tree).
>
> Bjorn
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems
2026-03-03 4:29 ` Madhavan Srinivasan
@ 2026-03-03 16:30 ` Bjorn Helgaas
0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2026-03-03 16:30 UTC (permalink / raw)
To: Madhavan Srinivasan
Cc: Nilay Shroff, Michael Ellerman, David S. Miller, Andreas Larsson,
John Paul Adrian Glaubitz, linuxppc-dev, linux-pci, sparclinux,
wangruikang, tglx, npiggin, chleroy, gjoyce
On Tue, Mar 03, 2026 at 09:59:15AM +0530, Madhavan Srinivasan wrote:
> On 2/27/26 10:14 PM, Bjorn Helgaas wrote:
> > On Fri, Feb 20, 2026 at 12:32:26PM +0530, Nilay Shroff wrote:
> > > Hi,
> > >
> > > Recent changes [1] which replaced pci_dev::no_64bit_msi with pci_dev::
> > > msi_addr_mask inadvertently missed to initialize the pci_dev::msi_addr_mask
> > > to the DMA_BIT_MASK(64) on powerpc platform. Due to this, later the
> > > validation the programmed MSI address against the msi_addr_mask fails.
> > > This causes pci device probe method failures on powerpc platform. We also
> > > realized that similar issue could potentially happen on sparc system as
> > > well. So this series initializes pci_dev::msi_addr_mask to DMA_BIT_MASK(64)
> > > when pci_dev is instantiated for both powerpc and sparc platforms.
> > >
> > > The first patch in the series fixes this on powerpc platform. The second
> > > patch fixes this issue on sparc platform. Please note that as I don't have
> > > access to the sparc platform, this patch was only compile tested on the
> > > sparc system. Anyone from the community is welcome to test it who has
> > > access to the sparc machine.
> > >
> > > [1] https://lore.kernel.org/all/20260129-pci-msi-addr-mask-v4-0-70da998f2750@iscas.ac.cn/
> > >
> > > Changes since v1:
> > > - Initialize the pci_dev:msi_addr_mask on sparc platform (Vivian Wang)
> > > - Some minor cosmetic fixes (Bjorn Helgaas)
> > >
> > > Nilay Shroff (2):
> > > powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
> > > sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
> > >
> > > arch/powerpc/kernel/pci_of_scan.c | 7 +++++++
> > > arch/sparc/kernel/pci.c | 7 +++++++
> > > 2 files changed, 14 insertions(+)
> > These fix regressions on powerpc and sparc caused by 386ced19e9a3
> > ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address
> > mask").
> >
> > These fixes have been tested by Han Gao (SPARC Enterprise T5220),
> > Nathaniel Roach (SPARC T5-2), and Venkat Rao Bagalkote (IBM Power
> > System LPAR (pseries)).
> >
> > It'd be great to have acks from the powerpc and sparc folks so they
>
> Sorry for the delayed response, yes we tested this from our end.
> Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Added your ack to the powerpc patch, thank you very much!
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-03-03 16:30 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 7:02 [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Nilay Shroff
2026-02-20 7:02 ` [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices Nilay Shroff
2026-02-22 10:46 ` Venkat
2026-03-01 6:59 ` Nam Cao
2026-02-20 7:02 ` [PATCHv2 2/2] sparc/pci: " Nilay Shroff
2026-02-21 16:36 ` Han Gao
2026-02-22 6:01 ` Nathaniel Roach
2026-02-20 10:14 ` [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Vivian Wang
2026-02-20 13:15 ` John Paul Adrian Glaubitz
2026-02-27 16:44 ` Bjorn Helgaas
2026-03-03 4:29 ` Madhavan Srinivasan
2026-03-03 16:30 ` Bjorn Helgaas
2026-03-02 23:07 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox