DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jijiang Liu <jijiang.liu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] lib/eal:igb_uio driver change
Date: Fri, 23 Jan 2015 13:35:40 +0800	[thread overview]
Message-ID: <1421991340-21960-4-git-send-email-jijiang.liu@intel.com> (raw)
In-Reply-To: <1421991340-21960-1-git-send-email-jijiang.liu@intel.com>

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 --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;
-- 
1.7.7.6

      parent reply	other threads:[~2015-01-23  5:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23  5:35 [dpdk-dev] [PATCH 0/3] dpdk/xen:support DPDK running on Xen Dom0 of SUSE Linux Jijiang Liu
2015-01-23  5:35 ` [dpdk-dev] [PATCH 1/3] compilation:fix compilation issues of using gcc-4.3.4 Jijiang Liu
2015-01-23  5:35 ` [dpdk-dev] [PATCH 2/3] lib/xen:DPDK dom0 Driver change Jijiang Liu
2015-01-23  5:35 ` Jijiang Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421991340-21960-4-git-send-email-jijiang.liu@intel.com \
    --to=jijiang.liu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).