From owner-svn-src-all@freebsd.org Wed Jul 3 09:48:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85CF115CE1A0; Wed, 3 Jul 2019 09:48:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 240A86C0F0; Wed, 3 Jul 2019 09:48:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 084109FC5; Wed, 3 Jul 2019 09:48:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639mK9q055899; Wed, 3 Jul 2019 09:48:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639mKWg055897; Wed, 3 Jul 2019 09:48:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907030948.x639mKWg055897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 09:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349645 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 349645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 240A86C0F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:48:21 -0000 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) {