From nobody Mon Aug 07 01:00:22 2023 X-Original-To: dev-commits-src-main@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 4RJyfc0mtwz4pk2Z; Mon, 7 Aug 2023 01:00: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 4RJyfb39Z0z3XvS; Mon, 7 Aug 2023 01:00:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691370023; 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=8gE1F+3Fu6HSYjKtR9xeMNqURPg/l0biUMc2xV+de1Q=; b=xz4tPjXc2Mz8+v7sXGQnHH6XUV1QSrJvzjiHEWNcSopiAovPGVty+IFgC8wWHfmLIN89u3 lVBkD8YeKjqlP2lMNes0W8QT0+WeuoT38bkh1F+m9m2nFTIODRyi4eSUjaUWqtpauWRl3c YiN1qJd+6e1iYFBnbGcqPf562tFMOOX7LeLZK5LzOV1DV74YrbtgBG1Q7uAcUxPMwvlPSa tEgAAcDVlIT5o95kz5Qah7rt5ixXlF7V0D0pTEwqPvbionRKeYk1z70O0t6xn6gKCBT9vn 2kgDTY3PS2eNv5ws0nbK8qwtOXj1OEwFqV1PDEPGFAwv9rPq0jODlgjhf/zWDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691370023; 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=8gE1F+3Fu6HSYjKtR9xeMNqURPg/l0biUMc2xV+de1Q=; b=wpCiCeHVxyqFi1ttGWEmzrg7gEmRpGWFuDHmz0+zCCdWUkPJyJt0O1y5h1buWtFoustWZc VEOhWSJmt09m0kcqIk8AC46ad+l4/oNsUXAHdclBAh2Dc2WtgyBIiQtUq+RMUn39QPZ5wa cI4bSc79fyAfe7+UjTIvWnEagatAqVWZvz9djOmcs9tm0sCtAz/7eL4ZYzMpY4ZtB9i84p N2EpY1Vi1LCxBX0cu+Nvn+O+F7j9tFIYc3A6isIGWvsZLUCFNzUPeSCX5VM3l3ofLxwlHj m5cMNz+/s3hMPgu3viwyMq6hlc6IBaPOAHcXPUUcnXRxFwPU2+OorziarkIHgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691370023; a=rsa-sha256; cv=none; b=V+6wG2RHRG4swfklTNgYB2fL5agOmX8AwLMBFsRDP/8XXcFsKZLN7SHgsc4vc2HZLuTmSE jBzVwL1L/zM7SDm3REZleEPGeebg4u1evf/kwZjKrwnopVsWWmsjfthIqq90LTBu8ELJ4z 0Lasyyl+fFdi+vYoSlvOJRfEK7U3PCLJEPG3qpc01L3OJEcLOMi0CUA/EyZvOJoLBuwnZ6 0L0vXHzLpTLNIoyoTl4W0ktm4SClxLqcgsJSF1J3dh6s7P3OAt0SEiBZEAGypORCRHV2Kc 1fmjMLTlCLhhMXTfe5JIy8+XFOoLf5HDN/vGy1AOuQMh3l9jw+cd10pP/WhrUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RJyfb0QBHzY0y; Mon, 7 Aug 2023 01:00:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37710MWa087089; Mon, 7 Aug 2023 01:00:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37710M2f087088; Mon, 7 Aug 2023 01:00:22 GMT (envelope-from git) Date: Mon, 7 Aug 2023 01:00:22 GMT Message-Id: <202308070100.37710M2f087088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: dcb0c54968db - main - LinuxKPI: replace vtophys+PHYS_TO_VM_PAGE with virt_to_page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: dcb0c54968db10d3c7619f16c4bcfa9284d50ea2 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dcb0c54968db10d3c7619f16c4bcfa9284d50ea2 commit dcb0c54968db10d3c7619f16c4bcfa9284d50ea2 Author: Bjoern A. Zeeb AuthorDate: 2023-07-31 05:28:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-08-07 00:58:21 +0000 LinuxKPI: replace vtophys+PHYS_TO_VM_PAGE with virt_to_page Rather than using the FreeBSD internal calls vtophys() and PHYS_TO_VM_PAGE() use the already existing LinuxKPI abstraction for this called virt_to_page(). This reduces the amount of compat code to maintain and will allow further work on struct [vm_]page. This should be a NOP. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41257 --- sys/compat/linuxkpi/common/src/linux_page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index cc45a77eadbe..e6c44e0368fc 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -138,7 +138,7 @@ linux_alloc_pages(gfp_t flags, unsigned int order) if (vaddr == 0) return (NULL); - page = PHYS_TO_VM_PAGE(vtophys((void *)vaddr)); + page = virt_to_page((void *)vaddr); KASSERT(vaddr == (vm_offset_t)page_address(page), ("Page address mismatch")); @@ -526,7 +526,7 @@ linuxkpi_page_frag_free(void *addr) { vm_page_t page; - page = PHYS_TO_VM_PAGE(vtophys(addr)); + page = virt_to_page(addr); linux_free_pages(page, 0); }