linux/arch/powerpc
Nilay Shroff 2185904ff8 powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices
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: 386ced19e9 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Tested-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Vivian Wang <wangruikang@iscas.ac.cn>
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260220070239.1693303-2-nilay@linux.ibm.com
2026-03-03 10:29:15 -06:00
..
boot powerpc updates for 6.19 2025-12-05 16:18:21 -08:00
configs mm.git review status for linus..mm-nonmm-stable 2026-02-12 12:13:01 -08:00
crypto lib/crypto: powerpc/aes: Migrate POWER8 optimized code into library 2026-01-12 11:39:58 -08:00
include mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
kernel powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices 2026-03-03 10:29:15 -06:00
kexec powerpc/kexec: Enable SMT before waking offline CPUs 2025-12-22 17:53:37 +05:30
kvm Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
lib treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
math-emu
mm Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
net Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
perf Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
platforms Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
purgatory
sysdev Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
tools powerpc/tools: drop -o pipefail in gcc check scripts 2025-12-22 17:56:34 +05:30
xmon powerpc/xmon: replace sizeof calculations with ARRAY_SIZE macro 2025-09-01 13:40:46 +05:30
Kbuild powerpc64/ftrace: Move ftrace sequence out of line 2024-10-31 11:00:54 +11:00
Kconfig mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
Kconfig.debug powerpc: Remove UDBG_RTAS_CONSOLE 2025-02-26 21:15:09 +05:30
Makefile kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact 2025-09-01 13:41:57 +05:30
Makefile.postlink powerpc/ftrace: Add a postlink script to validate function tracer 2024-10-31 11:00:54 +11:00