]> git.itanic.dy.fi Git - linux-stable/commit
PCI: dwc: Restrict only coherent DMA mask for MSI address allocation
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Fri, 13 Jan 2023 17:14:07 +0000 (20:14 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 22 Feb 2023 19:46:14 +0000 (13:46 -0600)
commit6c784e21b3da735bd2c3dba73acf9b2c033564fa
treeb4042fcfbf753d0ce6e958eee9d2719457029426
parent3bc0f149405e07c7e59985a24ce96db83973f8d7
PCI: dwc: Restrict only coherent DMA mask for MSI address allocation

The MSI target address must be in the lowest 4GB memory to support PCI
peripherals without 64-bit MSI support.  Since the allocation is done from
DMA coherent memory, set only the coherent DMA mask, leaving the streaming
DMA mask alone.

Thus streaming DMA operations will work with no artificial limitations. It
will be specifically useful for the eDMA-capable controllers so the
corresponding DMA engine clients would map the DMA buffers with no need for
SWIOTLB for buffers allocated above 4GB.

Add a brief comment about the reason allocating the MSI target address
below 4GB.

Link: https://lore.kernel.org/r/20230113171409.30470-26-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
drivers/pci/controller/dwc/pcie-designware-host.c