diff options
| author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2023-02-20 20:45:24 +0000 |
|---|---|---|
| committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2023-03-21 22:36:40 +0000 |
| commit | 83df72e5fb253a8842693ae8135e42d0c2403540 (patch) | |
| tree | ee80acc9ae13fe7e51298e61254a19c7a1c75d0c /sys/compat/linuxkpi/common/include/asm | |
| parent | 899becbfcbf75008c560bae5e5fce0c205a5bc82 (diff) | |
Diffstat (limited to 'sys/compat/linuxkpi/common/include/asm')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/asm/memtype.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 <asm/cpufeature.h> + +static inline bool +pat_enabled(void) +{ + return (boot_cpu_has(X86_FEATURE_PAT)); +} + +#endif + +#endif /* _LINUXKPI_ASM_MEMTYPE_H_ */ |
