From nobody Thu Aug 18 09:10:05 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 4M7fH13fBpz4YwgL; Thu, 18 Aug 2022 09:10:05 +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 4M7fH13DtZz3PSy; Thu, 18 Aug 2022 09:10:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660813805; 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=0OQSrSdnyLrs3BhF7f4dT1X8dW86Oilzoz1rK86bJOE=; b=uZG9dB+oC0ziNLA6SZ+FaHMqLTcBL9qkwSIVM76dtd1RTfyW1yObonilW483sCa3jqNpYB KDba0m9mqdfAASQ84GKwabugCisKJpDslv2kj9ZvMZeVHNuzWnN3QUR5ydWS67XjUT/VMF 9T5obz+q282b6EcSJnabXOHaSvOikP2GQcwRzj9bj7IV9lbumiEIleQ8H1ZQVZvPTCI8LW BwhqYNMGOE9dmy4KvkrLYt3d1ZkgvSaV5XZaU0ZL/il+/FUn2PegbELElFlB6UTFGYnC6X RVzLceIyyVvIuLkf5fOcJtfq9JNERkv+KW+k9BDOTRS0rWuONTd6OOT4Es1h1g== 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 4M7fH12LhXz1N6w; Thu, 18 Aug 2022 09:10:05 +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 27I9A53M017020; Thu, 18 Aug 2022 09:10:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27I9A5dq017018; Thu, 18 Aug 2022 09:10:05 GMT (envelope-from git) Date: Thu, 18 Aug 2022 09:10:05 GMT Message-Id: <202208180910.27I9A5dq017018@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: fd62b3fa1e82 - main - linuxkpi: pgtable: Add more defines 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: fd62b3fa1e82c8de3a1abacd4587fe4142e34d96 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660813805; 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=0OQSrSdnyLrs3BhF7f4dT1X8dW86Oilzoz1rK86bJOE=; b=SopAYozAvkPoKp5EJkiIGOfy0K/vhLrCu/TKYbLMsy+zigmFKqGfztYDVCHKsdi1Di/gtf l9ejExpx6AAdGl65SPsh2HNCWv9ixOpMAw1EuHrR8DjYZwC1V2Rx1cPmjCcjDmTpqbIxaq XcvyIVWYIbYqjAX6uB24M6AXcJYWy1/rPCAvzrGhTKyp3RrnckVUO3BsYuIuPBjBA+AZED XG4FvcjoqD93VK+hhLuUnzWyH1tfc+JxqD1ChV50LQ9+zcoKexXUqGYE/PWGi23q0VaWim 9BB+PyojLyE7LPlNsQhlAnzelTO5FZfHAU9GNN8QVpf/fzLtyewHwF4BJx4BEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660813805; a=rsa-sha256; cv=none; b=XcoMDeRECm+xuOWq0u9LKyJ+eaKkiyGjUanG6nahFWRKCUsGhksimSIrKyqe/cysVx0XBe uVOCbVIOAvTDceNuXxNOhPk2pJK6opO5MWeYgG6hQQwn3njdg+KCL0nnycYsjvwCgnJF1/ MBOTq4KjBwL5E9N2TXOMn2P9xkSQa12detjIxc9e07ZrdHiGaJkQWxgnCZYUNQg1FZFcnB pEhzdo4pA7i484KzsnM004dfgY+zVBMYD7nfGV22HY8gCq14aZjU3RefxDptM8J0xPSzKW //L2QvnflDLmKjbDY+aF06XW+++4nJuYT6LlsyCv18RwaSNS+waFM36NjYn3tA== 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=fd62b3fa1e82c8de3a1abacd4587fe4142e34d96 commit fd62b3fa1e82c8de3a1abacd4587fe4142e34d96 Author: Emmanuel Vadot AuthorDate: 2022-08-09 09:36:44 +0000 Commit: Emmanuel Vadot CommitDate: 2022-08-18 07:46:33 +0000 linuxkpi: pgtable: Add more defines Needed by drm-kmod Reviewed by: bz Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36101 --- sys/compat/linuxkpi/common/include/asm/pgtable.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/pgtable.h b/sys/compat/linuxkpi/common/include/asm/pgtable.h index 9e66fab8eae4..93e1bbef9a12 100644 --- a/sys/compat/linuxkpi/common/include/asm/pgtable.h +++ b/sys/compat/linuxkpi/common/include/asm/pgtable.h @@ -42,4 +42,19 @@ typedef struct page *pgtable_t; #define pgprot_decrypted(prot) (prot) +#if defined(__i386__) || defined(__amd64__) +#define _PAGE_BIT_PRESENT 0 +#define _PAGE_BIT_RW 1 +#define _PAGE_BIT_USER 2 +#define _PAGE_BIT_PWT 3 +#define _PAGE_BIT_PCD 4 +#define _PAGE_BIT_PAT 7 + +#define _PAGE_PRESENT (((pteval_t) 1) << _PAGE_BIT_PRESENT) +#define _PAGE_RW (((pteval_t) 1) << _PAGE_BIT_RW) +#define _PAGE_PWT (((pteval_t) 1) << _PAGE_BIT_PWT) +#define _PAGE_PCD (((pteval_t) 1) << _PAGE_BIT_PCD) +#define _PAGE_PAT (((pteval_t) 1) << _PAGE_BIT_PAT) +#endif + #endif /* _LINUXKPI_ASM_PGTABLE_H_ */