diff mbox

[dpdk-dev,3/3] lib/eal:igb_uio driver change

Message ID 1421991340-21960-4-git-send-email-jijiang.liu@intel.com (mailing list archive)
State Changes Requested, archived
Headers show

Commit Message

Jijiang Liu Jan. 23, 2015, 5:35 a.m. UTC
Replace the CONFIG_XEN_DOM0 with the CONFIG_XEN and RTE_LIBRTE_XEN_DOM0 in the driver in order to mmap IO memory correctly.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index ba1364b..7f643be 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -32,7 +32,7 @@ 
 #include <linux/msi.h>
 #include <linux/version.h>
 
-#ifdef CONFIG_XEN_DOM0
+#ifdef CONFIG_XEN
 #include <xen/xen.h>
 #endif
 #include <rte_pci_dev_features.h>
@@ -279,7 +279,7 @@  igbuio_pci_irqhandler(int irq, struct uio_info *info)
 	return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_XEN_DOM0
+#ifdef RTE_LIBRTE_XEN_DOM0 
 static int
 igbuio_dom0_mmap_phys(struct uio_info *info, struct vm_area_struct *vma)
 {
@@ -287,9 +287,7 @@  igbuio_dom0_mmap_phys(struct uio_info *info, struct vm_area_struct *vma)
 
 	idx = (int)vma->vm_pgoff;
 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-#ifdef HAVE_PTE_MASK_PAGE_IOMAP
 	vma->vm_page_prot.pgprot |= _PAGE_IOMAP;
-#endif
 
 	return remap_pfn_range(vma,
 			vma->vm_start,
@@ -487,7 +485,7 @@  igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	udev->info.version = "0.1";
 	udev->info.handler = igbuio_pci_irqhandler;
 	udev->info.irqcontrol = igbuio_pci_irqcontrol;
-#ifdef CONFIG_XEN_DOM0
+#ifdef RTE_LIBRTE_XEN_DOM0
 	/* check if the driver run on Xen Dom0 */
 	if (xen_initial_domain())
 		udev->info.mmap = igbuio_dom0_pci_mmap;