summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include/cpu.h
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-10-23 15:41:30 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-10-23 15:41:30 +0000
commit3716f301048c2432a412579f47266831a9f3d7e9 (patch)
tree66536d3b75cae1983bca2b01a8446bd1f16b43ac /sys/arch/amd64/include/cpu.h
parent1628e336922f9b2f725ef143c7f0ac10ce1bf9f2 (diff)
Expose TSC properties via sysctl nodes
From Adam Steen with suggestions from tedu@ OK deraadt, mlarkin (as part of a larger diff)
Diffstat (limited to 'sys/arch/amd64/include/cpu.h')
-rw-r--r--sys/arch/amd64/include/cpu.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h
index 3c9390272eb..f70193d8f21 100644
--- a/sys/arch/amd64/include/cpu.h
+++ b/sys/arch/amd64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.116 2017/10/17 14:25:35 visa Exp $ */
+/* $OpenBSD: cpu.h,v 1.117 2017/10/23 15:41:29 mikeb Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@@ -427,7 +427,9 @@ void mp_setperf_init(void);
#define CPU_XCRYPT 12 /* supports VIA xcrypt in userland */
#define CPU_LIDACTION 14 /* action caused by lid close */
#define CPU_FORCEUKBD 15 /* Force ukbd(4) as console keyboard */
-#define CPU_MAXID 16 /* number of valid machdep ids */
+#define CPU_TSCFREQ 16 /* TSC frequency */
+#define CPU_INVARIANTTSC 17 /* has invariant TSC */
+#define CPU_MAXID 18 /* number of valid machdep ids */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
@@ -446,6 +448,8 @@ void mp_setperf_init(void);
{ 0, 0 }, \
{ "lidaction", CTLTYPE_INT }, \
{ "forceukbd", CTLTYPE_INT }, \
+ { "tscfreq", CTLTYPE_QUAD }, \
+ { "invarianttsc", CTLTYPE_INT }, \
}
/*