linuxkpi: Define pat_enabled()
This new <asm/memtype.h> header is included from <linux/pci.h> 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
This commit is contained in:
parent
899becbfcb
commit
83df72e5fb
18
sys/compat/linuxkpi/common/include/asm/memtype.h
Normal file
18
sys/compat/linuxkpi/common/include/asm/memtype.h
Normal file
@ -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_ */
|
@ -57,6 +57,7 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/memtype.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/pci_ids.h>
|
||||
#include <linux/pm.h>
|
||||
|
Loading…
Reference in New Issue
Block a user