OSDN Git Service

PCI: tegra: Use the DMA-API to get the MSI address
authorVidya Sagar <vidyas@nvidia.com>
Tue, 16 Apr 2019 10:51:44 +0000 (16:21 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 16 Apr 2019 14:27:46 +0000 (15:27 +0100)
commit21e2079fe4938e84c0c5c0996cc03d63d5f9cacc
tree36c8ed8d066df3e601d0afd2a3f2d19d0f971be0
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
PCI: tegra: Use the DMA-API to get the MSI address

Since the upstream MSI memory writes are generated by downstream
devices, it is logically correct to have MSI target memory coming from
the DMA pool reserved for PCIe than from the general memory pool
reserved for CPU access to avoid PCIe DMA addresses coinciding with
MSI target address thereby raising unwanted MSI interrupts.

Enforce this behaviour by retrieving the MSI address through the DMA
API.

Limit the MSI target address to 32-bits to make it work for PCIe
endpoints that support only 32-bit MSI target address; endpoints that
support 64-bit MSI target address work with 32-bit MSI target
address too.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
drivers/pci/controller/pci-tegra.c