From nobody Fri Feb 17 23:44:46 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 4PJT1q0GHBz3rxPR; Fri, 17 Feb 2023 23:44:47 +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 4PJT1p4H8nz3GQs; Fri, 17 Feb 2023 23:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677486; 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=4CJ3OVYy9FfXdvBEWhhBftBqUc8geilqAE1wvtSL/fM=; b=BhADnQ5qZ0CnSDwqrw02c7bAdBG6BKk54efLkvFwq9d7AUkJ4229mU/00mktDwODZbikdi ThdM5bi6qzgPyBvZe+Rg17K+Ojh1J74yge1JRMOYhcYSyZailW2JRoF/yaT9bV5o4gyt7U AH8ai1ve61OtB+udoU0J02X2IWxxwMZ6Cr8CZDwn0ndkWGeR9GEDFaRpALLQzW2H5vU+6k Z16KPF28f2/523OuPK1QfEI5ZKKm8SUuW6urNPgIID5KU+IYzlB2k4k/22I78yJAZ3dXgS FYcwGkG8EBrEAkDBgRa8arOyO5/IGQpNjo7fIKaIW6WuzplC8lbwJs0+pObeUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676677486; 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=4CJ3OVYy9FfXdvBEWhhBftBqUc8geilqAE1wvtSL/fM=; b=arKl7+EA5lCCqRI9COihML+E3Synfa+S8tEWMrU6vG0z7oqYafM0qJf9G+yqoB+Rb+AV8v UZ2as38rSYGyeB8DOYO81YinOzPTbnTH5u9hStnGrHDBvt4nYJscx0HaIgWXhHEiuDIoYu GG47P4PtndYJ0vPE1twzvKz5quS9atzlQl7lbYd1YaPuNu9Bl23ICLe9zRhrkfjOAP0Qm1 EHMLIldRUrlt6nHLm713ivsJX5CbvFB8pgU8AI2yhBfG4MiFFeXJQjPLLVX2HeYtZHKk1R W7kKuGR4WepRi+Ax49Q5ptDh0Pk3xhQ9D5bPfnVc/Z7ACGwxxMogfp4xk3N76w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676677486; a=rsa-sha256; cv=none; b=psdKmTRh3swyQpoZWRlg8wxikvm1loyNL3jY70G3njutpd/+2e14iwDGXpIGgGfteU+V0D PMVpp+EeSetnNZz3kBumtBz7aCdmOqinI4hARvNQbdqimAGIKZ0xidSRx+dos+2TjkWO8Z c+P5M2rskV/cvarlnrT/JVkLc9zSW9FGUrEe+//45P4scEyInxcwYhIS88HAkN0+3CQHB0 tWmqgLTQa4W2PZSSueid1EM9TmBBkk2iLhwJUZQp+6TIfgXDj3X2uNyvTKfiKbHMrrszba sgjDAiIEHIOV/vA1klMEC10c8eMN8giF48IYlIC6FUyx7MpQ91fHkmRkYZcJzg== 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 4PJT1p3PHSz1239; Fri, 17 Feb 2023 23:44:46 +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 31HNikSv025038; Fri, 17 Feb 2023 23:44:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31HNikqe025037; Fri, 17 Feb 2023 23:44:46 GMT (envelope-from git) Date: Fri, 17 Feb 2023 23:44:46 GMT Message-Id: <202302172344.31HNikqe025037@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: 1984e6e4f158 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1984e6e4f1583ad1a44b6913e8722121fabe8967 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1984e6e4f1583ad1a44b6913e8722121fabe8967 commit 1984e6e4f1583ad1a44b6913e8722121fabe8967 Author: Bjoern A. Zeeb AuthorDate: 2023-01-28 16:00:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-17 23:42:14 +0000 LinuxKPI: mm.h: implement virt_to_head_page() Implement virt_to_head_page(). Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38240 (cherry picked from commit 70b97048a051958be37b650b8a67c89203fd6b70) --- 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 c1011b56fe24..49c961886678 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 @@ -151,6 +152,13 @@ struct sysinfo { uint32_t mem_unit; /* Memory unit size in bytes */ }; +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.