From nobody Thu Feb 23 19:34:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PN3B82yH5z3sfFg; Thu, 23 Feb 2023 19:34:24 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PN3B82Dmjz44gv; Thu, 23 Feb 2023 19:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677180864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WvXkQ3pGBQyi0iz+mqsbHCMnCxhSXr0E8UenEW+Y6mc=; b=GPppRrG1AuWJJN9Em9+GJz6poNeT0KvVwcHymdoN7HqD7QSo8PU42iz7D8FQDa26sbogxP qDfc2OPEM6ob6zm1OTAQrPCkd/fbKWVVcRVSMFmz/xFpCpzD84vtPhy+cUAaEtUTG7R9Xr nfXhzNr2Jw8lZX8UUVAFQ9us6QO6h089rJs481gPW6ioV2OXjm7Gfjr9IzYZrPT/1TRmW9 YCRV1ZXyIQ0AxVidUJJKruG3owsZBZ/V5gTelhlzCclS7yX0LqW8L6xnImvAnaNiyBCkwu wSwf1rkQT4pqFuoTUDsjfZkNFmGIHM91bAq2rhq2caTnf5ChwWSHYmwJHom0KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677180864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WvXkQ3pGBQyi0iz+mqsbHCMnCxhSXr0E8UenEW+Y6mc=; b=TDc/Yz0Vmrk7KkO+812JXp8j7D3YWjwKk+mCPlLVzDjdBp6Hklq/k7/ShTBIwHNM+mDqnG S05RTQbh6zQHp7MvWwIrNlY1u2bX6Nq0OU0EdmNbhi73ySpmloGZr6znKYYRAcYrWFS6Ei 6CxCfXapDU4FUnyK1YK7mzeHiq2BnwNTysAZPIUdgDd9QMkAGhFK1won1j+58SB5yRA8WN DpqB6V06BdvoJ/7jTfY3mkeYrM5TG+RHA2Ar/53A7WeyY1zIZNArMLNX0A2oRglvyJm8V4 7fI/dtvOmWG+qRapamGrAZn15a88xAauJtbmrRhzBqndOV5+zYEyHFJ2lqgi2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677180864; a=rsa-sha256; cv=none; b=uIxAXVk663CK3Ji6Md/iGzEHrgS0pTuekgCuZH6uIC8UGN29r58ipxThiNjo74dY//mtvC sLEcfqVCZduDJ/CjLTtESlXCcrAXLCivCPOOOVWp2afImANxL7KxZG2uSzm78dwFbwvhif aJVAUVbPIWey2IOor52XUH1ekNPxCmVaiDPIK7imud1TUXRaRf6YxQ6+dTCRlcY6GF1SA6 EZ7TnDzMsp6Itumqpd446xhw2Uge1eDV+v+VPaXo5uja7NQSkdQHYOhllL313v5en4EetD 7A5F3F7LAdBWNtBWgx+wn2oqeH3QRxLbh40gMxj8XOSllrrww6PqFON0IkLW1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PN3B81BhLzvTK; Thu, 23 Feb 2023 19:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31NJYOHK020137; Thu, 23 Feb 2023 19:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31NJYOUX020136; Thu, 23 Feb 2023 19:34:24 GMT (envelope-from git) Date: Thu, 23 Feb 2023 19:34:24 GMT Message-Id: <202302231934.31NJYOUX020136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 82f8db9d3fdd - releng/13.2 - LinuxKPI: mm.h: implement virt_to_head_page() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 82f8db9d3fddea4eb71e87febe51d808bd9bd219 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=82f8db9d3fddea4eb71e87febe51d808bd9bd219 commit 82f8db9d3fddea4eb71e87febe51d808bd9bd219 Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 16:00:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-23 19:31:37 +0000 LinuxKPI: mm.h: implement virt_to_head_page() Implement virt_to_head_page(). Sponsored by: The FreeBSD Foundation Reviewed by: markj Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D38240 (cherry picked from commit 70b97048a051958be37b650b8a67c89203fd6b70) (cherry picked from commit 1984e6e4f1583ad1a44b6913e8722121fabe8967) --- sys/compat/linuxkpi/common/include/linux/mm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 4afc1a953f8e..572bdd8e9ddc 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -41,6 +41,7 @@ #include #include #include +#include #include @@ -149,6 +150,13 @@ struct sysinfo { uint32_t mem_unit; }; +static inline struct page * +virt_to_head_page(const void *p) +{ + + return (virt_to_page(p)); +} + /* * Compute log2 of the power of two rounded up count of pages * needed for size bytes.