svn commit: r349645 - in head/sys/compat/linuxkpi/common: include/linux src
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Jul 3 09:48:21 UTC 2019
Author: hselasky
Date: Wed Jul 3 09:48:20 2019
New Revision: 349645
URL: https://svnweb.freebsd.org/changeset/base/349645
Log:
Remove dead code added after r348743 in the LinuxKPI. The
LINUXKPI_VERSION macro is not defined for any compiled LinuxKPI code
which basically means __GFP_NOTWIRED is never checked when allocating
pages. This should work fine with the existing external DRM code as
long as the page wiring and unwiring is balanced.
MFC after: 3 days
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/linux/gfp.h
head/sys/compat/linuxkpi/common/src/linux_page.c
Modified: head/sys/compat/linuxkpi/common/include/linux/gfp.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Jul 3 09:46:30 2019 (r349644)
+++ head/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Jul 3 09:48:20 2019 (r349645)
@@ -58,9 +58,6 @@
#define __GFP_NO_KSWAPD 0
#define __GFP_WAIT M_WAITOK
#define __GFP_DMA32 (1U << 24) /* LinuxKPI only */
-#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION == 50000
-#define __GFP_NOTWIRED (1U << 25)
-#endif
#define __GFP_BITS_SHIFT 25
#define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1)
#define __GFP_NOFAIL M_WAITOK
@@ -101,9 +98,6 @@ static inline struct page *
alloc_page(gfp_t flags)
{
-#ifdef __GFP_NOTWIRED
- flags |= __GFP_NOTWIRED;
-#endif
return (linux_alloc_pages(flags, 0));
}
@@ -111,9 +105,6 @@ static inline struct page *
alloc_pages(gfp_t flags, unsigned int order)
{
-#ifdef __GFP_NOTWIRED
- flags |= __GFP_NOTWIRED;
-#endif
return (linux_alloc_pages(flags, order));
}
@@ -121,9 +112,6 @@ static inline struct page *
alloc_pages_node(int node_id, gfp_t flags, unsigned int order)
{
-#ifdef __GFP_NOTWIRED
- flags |= __GFP_NOTWIRED;
-#endif
return (linux_alloc_pages(flags, order));
}
Modified: head/sys/compat/linuxkpi/common/src/linux_page.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_page.c Wed Jul 3 09:46:30 2019 (r349644)
+++ head/sys/compat/linuxkpi/common/src/linux_page.c Wed Jul 3 09:48:20 2019 (r349645)
@@ -93,10 +93,6 @@ linux_alloc_pages(gfp_t flags, unsigned int order)
unsigned long npages = 1UL << order;
int req = VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_NORMAL;
-#ifdef __GFP_NOTWIRED
- if ((flags & __GFP_NOTWIRED) != 0)
- req &= ~VM_ALLOC_WIRED;
-#endif
if ((flags & M_ZERO) != 0)
req |= VM_ALLOC_ZERO;
if (order == 0 && (flags & GFP_DMA32) == 0) {
More information about the svn-src-all
mailing list