From nobody Wed Sep 07 15:10:15 2022 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 4MN5KM53k5z4bPP2; Wed, 7 Sep 2022 15:10:15 +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 4MN5KM4Kp3z3YFf; Wed, 7 Sep 2022 15:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563415; 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=4Tkxp5Gny+Bd+pVzJcnZApH4nYiiQz/MBiF/mKuhVcw=; b=FHdkMcM/ua/qlnmrKPoSz2qrMeUs8efZp8XJKEutefnGen7rz+t8GEXMbdGKqR8XETm12x 3JkrZ9qRJth+XVWuRjFCzk158Rj3UVrZFXolG474furl0PooGo53O34c9DxSzkL5A5EKm0 p5GPD0g9g6ILzZn2xbNUBVmRr2KeyJE0tFqfgkWgnCcuIs37hKwNoz+27qPcM2ChznRWHG rdoFn8EhnmLVsRKJ8G83LW56Gm69+EGcaF0187zLfRYS93jnAgbfNQSCVw/SGIFxQOQguT vnHViSfd9akSIVz6kTTBfgMDq3G8Xc56zXGSSnvHVREyvPhn+hasIQM3iODoxQ== 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 4MN5KM3RPGzZ8p; Wed, 7 Sep 2022 15:10:15 +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 287FAFAZ022873; Wed, 7 Sep 2022 15:10:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 287FAFkT022867; Wed, 7 Sep 2022 15:10:15 GMT (envelope-from git) Date: Wed, 7 Sep 2022 15:10:15 GMT Message-Id: <202209071510.287FAFkT022867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: c84bd1f28711 - stable/13 - linuxkpi: Add trylock_page and unlock_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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c84bd1f287110d7ef9751a29116a4459b7749524 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563415; 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=4Tkxp5Gny+Bd+pVzJcnZApH4nYiiQz/MBiF/mKuhVcw=; b=fgtxa3unAUdHarN+yCgMmDzXhVm6d3oRyWuaefANeYpWdXATd0l42Uh3llRIjvj/N7rsEU Ui40rzXognlA1ENYhJfyJkvJrp50HcjsGIutZeat87l4R4GddbSqEXGQKKTzrZZohNboFe JRVaiebcAwf2TdY1aeHpetkqdJhW13/nFZCTPXoHkQXE2/sa7MiYbjmeHoKOOPVeZ2vCGV QeSHHJA8ePSAjlzc2LwIG+oPCi+eGEtJ8hVaFq9lSkcHNYpgOJJuPcxRMhHR+Ab+1PGczl ANogb2Q1bHtm5OPBRo6TplGw93NvPLTglVijjZmiUJDQ4DjWXT+gaDgqtXYpyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662563415; a=rsa-sha256; cv=none; b=HYWbMhU48qmz9WA2P+NxRWryotL5QQjHzMPFB1IpA2D7Zn1nSG4kaVvOnVPpUWz2BH0l4s 1L02Htca5tu5PL6447Ci6NkF+tc9frSb2sh+oLwyo0PZsbDWHgC25GwQcZ2+M1p1k8U93B NIGePqMbCvEmJpcNAlirKqrWT/6M8W6j6F+86U1ZJes0nojE/qQ9di62lYSvUXeUSdhZp6 zIs6FtheuEzpF43KLzxJbNLVfy1Rcy8a1asQ1bBH0eTAJqLEPYsZr5tk71ouujv28b2AWL 0gam36Po9k416AqoQgJcwAXQ+3UIST2MzPgRmZkfM9xZ1pFILT4hlbWKyjtXkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c84bd1f287110d7ef9751a29116a4459b7749524 commit c84bd1f287110d7ef9751a29116a4459b7749524 Author: Emmanuel Vadot AuthorDate: 2022-08-02 07:33:47 +0000 Commit: Emmanuel Vadot CommitDate: 2022-09-07 15:09:04 +0000 linuxkpi: Add trylock_page and unlock_page Simple wrapper around vm_page_trylock and vm_page_unlock. Reviewed by: hselasky Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36019 (cherry picked from commit d1c3cfd79da148755ef0fa51f65cd8d0d64b9a88) --- sys/compat/linuxkpi/common/include/linux/mm.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 4d4c189e2939..d2db343fc094 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -288,6 +288,19 @@ vmalloc_to_page(const void *addr) return (PHYS_TO_VM_PAGE(paddr)); } +static inline int +trylock_page(struct page *page) +{ + return (vm_page_trylock(page)); +} + +static inline void +unlock_page(struct page *page) +{ + + vm_page_unlock(page); +} + extern int is_vmalloc_addr(const void *addr); void si_meminfo(struct sysinfo *si);