* [PATCH] igb_uio: fix Xen compatibility with kernel 3.18 @ 2014-12-11 19:33 Shu Shen [not found] ` <1418326403-27870-1-git-send-email-shu.shen-4y/IbmOpLWVBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Shu Shen @ 2014-12-11 19:33 UTC (permalink / raw) To: dev-VfR2kkLFssw 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 <shu.shen-4y/IbmOpLWVBDgjK7y7TUQ@public.gmane.org> --- 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, -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1418326403-27870-1-git-send-email-shu.shen-4y/IbmOpLWVBDgjK7y7TUQ@public.gmane.org>]
* Re: [PATCH] igb_uio: fix Xen compatibility with kernel 3.18 [not found] ` <1418326403-27870-1-git-send-email-shu.shen-4y/IbmOpLWVBDgjK7y7TUQ@public.gmane.org> @ 2014-12-12 4:39 ` Jincheng Miao [not found] ` <548A7175.6060701-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Jincheng Miao @ 2014-12-12 4:39 UTC (permalink / raw) To: Shu Shen, dev-VfR2kkLFssw 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 <shu.shen-4y/IbmOpLWVBDgjK7y7TUQ@public.gmane.org> > --- > 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, ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <548A7175.6060701-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] igb_uio: fix Xen compatibility with kernel 3.18 [not found] ` <548A7175.6060701-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2014-12-16 23:59 ` Thomas Monjalon 0 siblings, 0 replies; 3+ messages in thread From: Thomas Monjalon @ 2014-12-16 23:59 UTC (permalink / raw) To: Shu Shen; +Cc: dev-VfR2kkLFssw 2014-12-12 12:39, Jincheng Miao: > 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 <shu.shen-4y/IbmOpLWVBDgjK7y7TUQ@public.gmane.org> > > ACK, kernel-3.18.0 drops _PAGE_IOMAP. Applied Thanks -- Thomas ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-16 23:59 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-11 19:33 [PATCH] igb_uio: fix Xen compatibility with kernel 3.18 Shu Shen [not found] ` <1418326403-27870-1-git-send-email-shu.shen-4y/IbmOpLWVBDgjK7y7TUQ@public.gmane.org> 2014-12-12 4:39 ` Jincheng Miao [not found] ` <548A7175.6060701-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2014-12-16 23:59 ` Thomas Monjalon
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).