From nobody Tue Mar 21 22:40:00 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 4Ph64J6203z40vyr; Tue, 21 Mar 2023 22:40:00 +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 4Ph64J5HMsz4G3P; Tue, 21 Mar 2023 22:40:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679438400; 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=zbE1GSx/p0G+LzjBQMJuoHcUz/XNkFM5kFfGtlqQ0Nw=; b=sxhr0pKuGEDaH/IQFjZggjH90nvG2ZJgGf1Yf0hSTG5E/fZ/T+Rzscb38Yh4OGBArwNyFb epSWn0i7atGhRwHI2T3PYL82kYyYoluRLpAtGlaUjZw1+zyWqfOSG84YzvSHYPrP2qfwNr 7qW7PwMLS1syvPP0EPTxOuAVoAlb0+lzLmmYkHZ9OYQ4xO+tu5Y1bP15Xpkvis4jSPAMNm +1N2ZFjN5xVuC7ciYDvMK7c960sKupK4ZNtU8Lqy8i4g3bA+NrFgKQTaEcVeKpbXltdgIb 8an4KsN138gl6HeZiTCjFBm1mTBNkI9pO1sKklaHNHQOsaRAAXGWH4sJRTSKDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679438400; 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=zbE1GSx/p0G+LzjBQMJuoHcUz/XNkFM5kFfGtlqQ0Nw=; b=KCqatPlC4YtRwYfcJOPclK78Vi2mWpVRsGVwY5b6fd0p4DNKRWcJh5tYtUnX++LQHwUcaZ KRsHGGpC4OxsPVMaoMwBER3a+yA3qTO1SvK8/tgR0FEgrb35xzYEfITs2jJagPMhJqtSR5 yg3SWPbvtuQyeeFJSXNgGh02Pj0JRbfZ0TEHQmxusnTcJKYNiSWcRQJdu0s9xWkitpgX7r 71qpViyWhHfLZ8Y4gUfM/5Nv0XJvwq4gdUN65mBVb91FGP+r55YrQtn46Gm4TkQedTfr37 YyrgO/xiIyCmptHLrPtmLHyAxnfPbBue0QajqnZB0G7ltM5pMIferz+3I9TTGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679438400; a=rsa-sha256; cv=none; b=MZon/b+DLiP6sSN46iNElmf7uAw18C9v89aC9PlEhjNtZfKVCO9fEHDC6ReUumYhIaZ9Rx VtcBkfenzBaMH1ddyGOwFQKfY+aq2OAKjjf3cvULC/o/At1+0oKOEip1YFK14FPVrzP/0k QD971DhYgZw+EH2j9bA/A2/tfZzmLd8HbllNFq6368UwZ8Uh7y3nJ8hp2QRv9E4xqB30GM z8q9amj3HT8IkS7oju39nryiiXiPiS3s10G5+VJ8XpiN8OiZiPTOvvVsQoH0Hd9w10FOym S1zEq8a2st+s4kqx2/D95UAYvc8xOCwRr68QmLlHq3zs5NSMhqgCDA1hkqyLSA== 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 4Ph64J4LTlzVQt; Tue, 21 Mar 2023 22:40:00 +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 32LMe0g3054935; Tue, 21 Mar 2023 22:40:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32LMe0Sv054914; Tue, 21 Mar 2023 22:40:00 GMT (envelope-from git) Date: Tue, 21 Mar 2023 22:40:00 GMT Message-Id: <202303212240.32LMe0Sv054914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 83df72e5fb25 - main - linuxkpi: Define `pat_enabled()` 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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83df72e5fb253a8842693ae8135e42d0c2403540 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=83df72e5fb253a8842693ae8135e42d0c2403540 commit 83df72e5fb253a8842693ae8135e42d0c2403540 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-20 20:45:24 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-03-21 22:36:40 +0000 linuxkpi: Define `pat_enabled()` This new header is included from because that's how it is included in Linux too. DRM drivers depend on this. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D39052 --- sys/compat/linuxkpi/common/include/asm/memtype.h | 18 ++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/pci.h | 1 + 2 files changed, 19 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/memtype.h b/sys/compat/linuxkpi/common/include/asm/memtype.h new file mode 100644 index 000000000000..c433e54fd7bf --- /dev/null +++ b/sys/compat/linuxkpi/common/include/asm/memtype.h @@ -0,0 +1,18 @@ +/* Public domain. */ + +#ifndef _LINUXKPI_ASM_MEMTYPE_H_ +#define _LINUXKPI_ASM_MEMTYPE_H_ + +#if defined(__amd64__) || defined(__i386__) + +#include + +static inline bool +pat_enabled(void) +{ + return (boot_cpu_has(X86_FEATURE_PAT)); +} + +#endif + +#endif /* _LINUXKPI_ASM_MEMTYPE_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 2c222bf1cdbe..8077a75c4dd9 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include