1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

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
This commit is contained in:
Hans Petter Selasky 2019-07-03 09:48:20 +00:00
parent 330014fd65
commit 8996977a89
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349645
2 changed files with 0 additions and 16 deletions

View File

@ -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));
}

View File

@ -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) {