Commit d30a6b84 authored by Tushar Dave's avatar Tushar Dave Committed by David S. Miller

sparc64: Enable 64-bit DMA

ATU 64bit addressing allows PCIe devices with 64bit DMA capabilities
to use ATU for 64bit DMA.
Signed-off-by: default avatarTushar Dave <tushar.n.dave@oracle.com>
Reviewed-by: default avatarchris hyser <chris.hyser@oracle.com>
Acked-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f08978b0
...@@ -93,6 +93,10 @@ config ARCH_ATU ...@@ -93,6 +93,10 @@ config ARCH_ATU
bool bool
default y if SPARC64 default y if SPARC64
config ARCH_DMA_ADDR_T_64BIT
bool
default y if ARCH_ATU
config IOMMU_HELPER config IOMMU_HELPER
bool bool
default y if SPARC64 default y if SPARC64
......
...@@ -760,8 +760,12 @@ int dma_supported(struct device *dev, u64 device_mask) ...@@ -760,8 +760,12 @@ int dma_supported(struct device *dev, u64 device_mask)
struct iommu *iommu = dev->archdata.iommu; struct iommu *iommu = dev->archdata.iommu;
u64 dma_addr_mask = iommu->dma_addr_mask; u64 dma_addr_mask = iommu->dma_addr_mask;
if (device_mask >= (1UL << 32UL)) if (device_mask > DMA_BIT_MASK(32)) {
if (iommu->atu)
dma_addr_mask = iommu->atu->dma_addr_mask;
else
return 0; return 0;
}
if ((device_mask & dma_addr_mask) == dma_addr_mask) if ((device_mask & dma_addr_mask) == dma_addr_mask)
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment