From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74669C47089 for ; Wed, 30 Nov 2022 22:08:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BEC866B0074; Wed, 30 Nov 2022 17:08:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 989C16B0081; Wed, 30 Nov 2022 17:08:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F7186B0075; Wed, 30 Nov 2022 17:08:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 3E5756B0081 for ; Wed, 30 Nov 2022 17:08:07 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id CE39CA111C for ; Wed, 30 Nov 2022 22:08:06 +0000 (UTC) X-FDA: 80191497372.23.81D2456 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id 55AF5140011 for ; Wed, 30 Nov 2022 22:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=LAxzevWS6YPjNXWh31EDfcrFweLPV/vKsTWRIoCwYk8=; b=Q3AOoll1e7TsmpbCt5Usl8uDJ/ so3m8U9hVMfnRgp7mzSDXMC4JghiFAVwzqVOhZzB9ekBfCj0U7/f/XRfRm7hDAStcHDvXo7Tw9n/s dDh4nS2EohevkK9OltPAuW99iVugPDbISJAG/VPZcEju10qexa7pWsqj/Oi5vGO+Aoqo7xiUMLiWC j1fZawbP4orkfv6iFv61Go/nfWrdjoPviVCaP+bw2pHZ90VVxXZNfWPg/TEYHAlK5JjBvn8QltV1i 1jC8+x6Yrw+kooi8Q9xu2l+g6Kh42ahY12wHwtQyc+br2Wj4NyjCgJHeFWmSfAuCWf2RUHDf09JZf p5vpbCnA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0VFO-00FLWY-Iw; Wed, 30 Nov 2022 22:08:06 +0000 From: "Matthew Wilcox (Oracle)" To: Jesper Dangaard Brouer , Ilias Apalodimas Cc: "Matthew Wilcox (Oracle)" , netdev@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 21/24] netmem_to_virt Date: Wed, 30 Nov 2022 22:08:00 +0000 Message-Id: <20221130220803.3657490-22-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221130220803.3657490-1-willy@infradead.org> References: <20221130220803.3657490-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669846086; a=rsa-sha256; cv=none; b=rbAxaJQpbrrnyqjrEwhWKBiCH7NLpftG2MqYVB4+pVT+HWJ3YBMys7KubTjmgaHZQPsIFu icJnlt90t+16xeLq3mXl5pe95hKEY24eKgs1aYpY2QrpLa90eZNLMK6y6X6a5HkD5Gdysh o2lRHbi/jfNKVzPcqWD7+ZiwLBFAe6Y= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Q3AOoll1; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669846086; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LAxzevWS6YPjNXWh31EDfcrFweLPV/vKsTWRIoCwYk8=; b=TV5y4BzhdoR7kom51ToIxM47Wm6maSwJEt7DNiEs2zE7ma+4X3y4Zt9NtC31v/qdNIt2Fr sPzAaSveoy+PqCiSOITGD5thtQSv+SpOeGLNZNaZlYUPIpriu7luzpqE6VTanmEStZmukv 7/0dqZgv+HatdD0+HGbKRU18MpbH4dE= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 55AF5140011 X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Q3AOoll1; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: c9mrmfuesqpugqcwrg8f3dik68t6m95z X-HE-Tag: 1669846086-539135 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --- include/net/page_pool.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/net/page_pool.h b/include/net/page_pool.h index 222eedc39140..e13e3a8e83d3 100644 --- a/include/net/page_pool.h +++ b/include/net/page_pool.h @@ -112,6 +112,11 @@ static inline struct netmem *virt_to_netmem(const void *x) return page_netmem(virt_to_head_page(x)); } +static inline void *netmem_to_virt(const struct netmem *nmem) +{ + return page_to_virt(netmem_page(nmem)); +} + static inline int netmem_ref_count(const struct netmem *nmem) { return page_ref_count(netmem_page(nmem)); -- 2.35.1