From nobody Mon Aug 08 14:04:24 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 4M1dHF111lz4Y4T2; Mon, 8 Aug 2022 14:04:25 +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 4M1dHD5bpBz3vn8; Mon, 8 Aug 2022 14:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659967464; 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=8DJ1YVbDlGNwE12RGGiiJnGanQxtH4HSWTv/f4oLAY0=; b=dyAFOD491JA+HF0ubsgoAJQ74B7iBME3hehpM+klVNvmltjFN3a0R9ISxjrRS0rxS27QNO 5i2O7gK8BRzyll9CJBWijLRoQ6lu5mWrsEGikitD7ewdnURhEpUG1nyTmE/4mSAzLJTdWo aKo2OpT8n0fNjVYobiRuTNJJqzK7Kg8DGY8++9dcp01XgiAUDQKtuXJVjJlJe+gsrW9QKs CjNIlY7y1Netu+X1civ+vvgm0hqcLD34Bvfr6havBANOZviAmPNmZ41lz0Ep8Q6962pUsa zOtYePQl4sJkuUo/dYcMy3RPQ4apPTU8xlH6NoAiwuz4q4w2PyLOfP1MLHYIHQ== 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 4M1dHD4hyczv38; Mon, 8 Aug 2022 14:04: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 278E4Op8088965; Mon, 8 Aug 2022 14:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 278E4Ong088964; Mon, 8 Aug 2022 14:04:24 GMT (envelope-from git) Date: Mon, 8 Aug 2022 14:04:24 GMT Message-Id: <202208081404.278E4Ong088964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: d1c3cfd79da1 - main - 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/main X-Git-Reftype: branch X-Git-Commit: d1c3cfd79da148755ef0fa51f65cd8d0d64b9a88 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659967464; 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=8DJ1YVbDlGNwE12RGGiiJnGanQxtH4HSWTv/f4oLAY0=; b=ZcgQh4JbwzrEpkqnsz/YWglkVkol2iFbQQr7qxnALrqVL4Qk8Iogrh09ht2hu/NpiJGrLN 9A645wowCvUwYOBaN93xfOGW5uauRJ6JlXgrq+Nt8utBTscYC/F+wv/qVJ9xcsn0oDjuQL JDGq2I9SxjJDofPIwYV1ZYQef6Br/l8LRd+sR2YpNHc64uXK0M2v3XB60smalew065VfVV FoexMpfUgqrbIQsDbIRTnzfbIKj0M1V+aHj44GGd7YHGv5vrjQuZwa8bVDG5z1CdF9G/rH Xe9p4dcoTWUjXuZZUrW1hAkFOOcxfSTUlLaEAv+U1GPAyDe9bY3Q9DVyeXhSQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659967464; a=rsa-sha256; cv=none; b=a5vfv2frHPIv67LVY5w9ImHEdtsjxxgflJVMypX2Qz/1wLXphWgI7sxZTalmw7M9FF5P5k vEn4cr9lD1ePg+Iv4rpPQrw/cIDO1eDkrR3erixlZ+W5QwBlDdsxxl0c5mlkHW3sG/0Y+F mWGAkrp9IjWV50QlQysjRAiuqi2HP3NZE9DWpwNLfbrnhs0nIObLEATF8K9LBP6HvGzLT5 EJJMLL617sthle2wADxUzSaBYz/TQcRBcMS/MooXEY1oV+9kheDYvXQLxkPonnjiGMXqW4 bKupErFGOuoycBlUg4MNEXfAwepbr4Bmn9XCVbE9rZ5Lg+W2ioirYFymojJM/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d1c3cfd79da148755ef0fa51f65cd8d0d64b9a88 commit d1c3cfd79da148755ef0fa51f65cd8d0d64b9a88 Author: Emmanuel Vadot AuthorDate: 2022-08-02 07:33:47 +0000 Commit: Emmanuel Vadot CommitDate: 2022-08-08 13:22:35 +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 --- 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 5a16cf0d0a58..a266b5913625 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);