Commit bac79d72 authored by Will McVicker's avatar Will McVicker
Browse files

BACKPORT: FROMGIT: PCI: dwc: Add support for 64-bit MSI target address

Since not all devices require a 32-bit MSI address, add support to the
PCIe host driver to allow setting the DMA mask to 64-bits if the 32-bit
allocation fails. This allows kernels to disable ZONE_DMA32 and bounce
buffering (swiotlb) without risking not being able to get a 32-bit
address during DMA allocation.

Basically, in the slim chance that there are no 32-bit allocations
available, the current PCIe host driver will fail to allocate the
msi_msg page due to a DMA address overflow (seen in [1]). With this
patch, the PCIe host can retry the allocation with a 64-bit DMA mask if
the current PCIe device advertises 64-bit support via its MSI
capabilities.

[1] https://lore.kernel.org/all/Yo0soniFborDl7+C@google.com/

Bug: 241473543
Link: https://lore.kernel.org/r/20220825235404.4132818-3-willmcvicker@google.com


Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarWill McVicker <willmcvicker@google.com>
Signed-off-by: default avatarLorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
Change-Id: I8936717b26f3dec453b0a944b26a0bb891905100
(cherry picked from commit e99d8c5e803b9a9f0b5a84165dad3b8895446147 https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git pci/dwc)
parent c7d54794
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment