Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2019 15:07:34 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r350032 - in stable/12/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201907161507.x6GF7YAm082801@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Jul 16 15:07:33 2019
New Revision: 350032
URL: https://svnweb.freebsd.org/changeset/base/350032

Log:
  MFC r349645:
  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.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h
  stable/12/sys/compat/linuxkpi/common/src/linux_page.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h	Tue Jul 16 15:02:28 2019	(r350031)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h	Tue Jul 16 15:07:33 2019	(r350032)
@@ -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: stable/12/sys/compat/linuxkpi/common/src/linux_page.c
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/src/linux_page.c	Tue Jul 16 15:02:28 2019	(r350031)
+++ stable/12/sys/compat/linuxkpi/common/src/linux_page.c	Tue Jul 16 15:07:33 2019	(r350032)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907161507.x6GF7YAm082801>