Blame SOURCES/0001-mem-fix-max-DMA-maskbit-size.patch

dd2e6b
From 6f43d909b39607af7200a735cb0f959853d5fef6 Mon Sep 17 00:00:00 2001
dd2e6b
From: Alejandro Lucero <alejandro.lucero@netronome.com>
dd2e6b
Date: Fri, 31 Aug 2018 15:53:52 +0100
dd2e6b
Subject: [PATCH] mem: fix max DMA maskbit size
dd2e6b
dd2e6b
The sanity check inside rte_eal_check_dma_mask is using 47 bits as
dd2e6b
the maximum size. It turns out there are some IOMMU hardware reporting
dd2e6b
48 bits precluding the IOVA VA mode to be enabled.
dd2e6b
dd2e6b
It is harmless to raise the maximum mask size to 63 bits.
dd2e6b
dd2e6b
This patch also removes any reference to unused X86_VA_WIDTH.
dd2e6b
dd2e6b
Fixes: 3a80bc50c949 ("mem: add function for checking memsegs IOVAs addresses")
dd2e6b
dd2e6b
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
dd2e6b
---
dd2e6b
 drivers/bus/pci/linux/pci.c               | 1 -
dd2e6b
 lib/librte_eal/common/eal_common_memory.c | 5 -----
dd2e6b
 2 files changed, 6 deletions(-)
dd2e6b
dd2e6b
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
dd2e6b
index c81ed5025..44440f223 100644
dd2e6b
--- a/drivers/bus/pci/linux/pci.c
dd2e6b
+++ b/drivers/bus/pci/linux/pci.c
dd2e6b
@@ -583,7 +583,6 @@ pci_one_device_iommu_support_va(struct rte_pci_device *dev)
dd2e6b
 {
dd2e6b
 #define VTD_CAP_MGAW_SHIFT	16
dd2e6b
 #define VTD_CAP_MGAW_MASK	(0x3fULL << VTD_CAP_MGAW_SHIFT)
dd2e6b
-#define X86_VA_WIDTH 47 /* From Documentation/x86/x86_64/mm.txt */
dd2e6b
 	struct rte_pci_addr *addr = &dev->addr;
dd2e6b
 	char filename[PATH_MAX];
dd2e6b
 	FILE *fp;
dd2e6b
diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
dd2e6b
index 00ab3935c..a0922f18b 100644
dd2e6b
--- a/lib/librte_eal/common/eal_common_memory.c
dd2e6b
+++ b/lib/librte_eal/common/eal_common_memory.c
dd2e6b
@@ -109,13 +109,8 @@ rte_dump_physmem_layout(FILE *f)
dd2e6b
 	}
dd2e6b
 }
dd2e6b
 
dd2e6b
-#if defined(RTE_ARCH_X86)
dd2e6b
-#define X86_VA_WIDTH 47 /* From Documentation/x86/x86_64/mm.txt */
dd2e6b
-#define MAX_DMA_MASK_BITS X86_VA_WIDTH
dd2e6b
-#else
dd2e6b
 /* 63 bits is good enough for a sanity check */
dd2e6b
 #define MAX_DMA_MASK_BITS 63
dd2e6b
-#endif
dd2e6b
 
dd2e6b
 /* check memseg iovas are within the required range based on dma mask */
dd2e6b
 int
dd2e6b
-- 
dd2e6b
2.17.1
dd2e6b