summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hfi1/pio.h
diff options
context:
space:
mode:
authorTymoteusz Kielan <tymoteusz.kielan@intel.com>2016-09-06 14:35:54 +0300
committerDoug Ledford <dledford@redhat.com>2016-10-02 15:42:07 +0300
commit60368186fd853899c1819bcefa47f85fe8d5e5ad (patch)
tree991c21483223261f8c8a8e04498c1ecd235245ed /drivers/infiniband/hw/hfi1/pio.h
parent0b115ef100a3734265a46e13707446d2de00df5c (diff)
downloadlinux-60368186fd853899c1819bcefa47f85fe8d5e5ad.tar.xz
IB/hfi1: Fix user-space buffers mapping with IOMMU enabled
The dma_XXX API functions return bus addresses which are physical addresses when IOMMU is disabled. Buffer mapping to user-space is done via remap_pfn_range() with PFN based on bus address instead of physical. This results in wrong pages being mapped to user-space when IOMMU is enabled. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Tymoteusz Kielan <tymoteusz.kielan@intel.com> Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/pio.h')
-rw-r--r--drivers/infiniband/hw/hfi1/pio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/pio.h b/drivers/infiniband/hw/hfi1/pio.h
index 464cbd27b975..e709eaf743b5 100644
--- a/drivers/infiniband/hw/hfi1/pio.h
+++ b/drivers/infiniband/hw/hfi1/pio.h
@@ -154,7 +154,7 @@ struct credit_return {
/* NUMA indexed credit return array */
struct credit_return_base {
struct credit_return *va;
- dma_addr_t pa;
+ dma_addr_t dma;
};
/* send context configuration sizes (one per type) */