Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 01:25:05 UTC 2021

Modified Files:
        src/sys/external/bsd/drm2/include/asm: cpufeature.h

Log Message:
boot_cpu_has(X86_FEATURE_PAT)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/include/asm/cpufeature.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/include/asm/cpufeature.h
diff -u src/sys/external/bsd/drm2/include/asm/cpufeature.h:1.6 src/sys/external/bsd/drm2/include/asm/cpufeature.h:1.7
--- src/sys/external/bsd/drm2/include/asm/cpufeature.h:1.6	Sun Dec 19 01:18:39 2021
+++ src/sys/external/bsd/drm2/include/asm/cpufeature.h	Sun Dec 19 01:25:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufeature.h,v 1.6 2021/12/19 01:18:39 riastradh Exp $	*/
+/*	$NetBSD: cpufeature.h,v 1.7 2021/12/19 01:25:05 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -40,6 +40,7 @@
 #define	cpu_has_pat	((cpu_info_primary.ci_feat_val[0] & CPUID_PAT) != 0)
 
 #define	X86_FEATURE_CLFLUSH	0
+#define	X86_FEATURE_PAT		1
 
 static inline bool
 static_cpu_has(int feature)
@@ -47,11 +48,15 @@ static_cpu_has(int feature)
 	switch (feature) {
 	case X86_FEATURE_CLFLUSH:
 		return cpu_has_clflush;
+	case X86_FEATURE_PAT:
+		return cpu_has_pat;
 	default:
 		return false;
 	}
 }
 
+#define	boot_cpu_has	static_cpu_has
+
 static inline size_t
 cache_line_size(void)
 {

Reply via email to