PCI: dwc: Drop dependency on ZONE_DMA32
authorWill McVicker <willmcvicker@google.com>
Thu, 25 Aug 2022 23:54:02 +0000 (23:54 +0000)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Mon, 29 Aug 2022 07:56:33 +0000 (09:56 +0200)
commit423511ec23e2a6fa7830ed76b0283268e795d09d
tree3489d731444dfef1f012e87880fe4cee591515d0
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868
PCI: dwc: Drop dependency on ZONE_DMA32

Re-work the msi_msg DMA allocation logic to use dmam_alloc_coherent() which
uses the coherent DMA mask to try to return an allocation within the DMA
mask limits. With that, we now can drop the msi_page parameter in struct
dw_pcie_rp. This allows kernel configurations that disable ZONE_DMA32 to
continue supporting a 32-bit DMA mask. Without this patch, the PCIe host
device will fail to probe when ZONE_DMA32 is disabled.

Link: https://lore.kernel.org/r/20220825235404.4132818-2-willmcvicker@google.com
Fixes: 35797e672ff0 ("PCI: dwc: Fix MSI msi_msg DMA mapping")
Reported-by: Isaac J. Manjarres <isaacmanjarres@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/dwc/pcie-designware.h