From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6C2B28043 for ; Fri, 12 Dec 2014 05:41:28 +0100 (CET) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBC4fQDW016914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 11 Dec 2014 23:41:26 -0500 Received: from dhcp-66-71-51.eng.nay.redhat.com (dhcp-66-71-51.eng.nay.redhat.com [10.66.71.51] (may be forged)) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBC4fOGT020100; Thu, 11 Dec 2014 23:41:25 -0500 Message-ID: <548A7175.6060701@redhat.com> Date: Fri, 12 Dec 2014 12:39:17 +0800 From: Jincheng Miao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Shu Shen , dev@dpdk.org References: <1418326403-27870-1-git-send-email-shu.shen@radisys.com> In-Reply-To: <1418326403-27870-1-git-send-email-shu.shen@radisys.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Subject: Re: [dpdk-dev] [PATCH] igb_uio: fix Xen compatibility with kernel 3.18 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2014 04:41:29 -0000 ACK, kernel-3.18.0 drops _PAGE_IOMAP. On 12/12/2014 03:33 AM, Shu Shen wrote: > This patch fixes build failing with undefined symbol _PAGE_IOMAP with > kernel 3.18. > > The Xen-specific _PAGE_IOMAP PTE flag was removed in kernel 3.18 and > could be used for other purpose in future. This patch ensures that > _PAGE_IOMAP flag is only used for kernels before 3.18. > > Signed-off-by: Shu Shen > --- > lib/librte_eal/linuxapp/igb_uio/compat.h | 4 ++++ > lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h > index 9454382..c1d45a6 100644 > --- a/lib/librte_eal/linuxapp/igb_uio/compat.h > +++ b/lib/librte_eal/linuxapp/igb_uio/compat.h > @@ -11,6 +11,10 @@ > #define pci_cfg_access_unlock pci_unblock_user_cfg_access > #endif > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) > +#define HAVE_PTE_MASK_PAGE_IOMAP > +#endif > + > #ifndef PCI_MSIX_ENTRY_SIZE > #define PCI_MSIX_ENTRY_SIZE 16 > #define PCI_MSIX_ENTRY_LOWER_ADDR 0 > diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > index 47ff2f3..60a2db1 100644 > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > @@ -287,7 +287,9 @@ 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); > +#if defined(HAVE_PTE_MASK_PAGE_IOMAP) > vma->vm_page_prot.pgprot |= _PAGE_IOMAP; > +#endif > > return remap_pfn_range(vma, > vma->vm_start,