From 879060768acca9d10c83640d78ed66f15d60833a Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Sun, 7 Jun 2015 06:25:00 +0000 Subject: Enable use of mwait in non-MP boxes and report # of C-substates up to C7, truncating trailing zeros. Testing by many as part of a larger change to use ACPI _CST objects ok krw@ --- sys/arch/i386/include/cpu.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/arch/i386/include/cpu.h') diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index 623154e993d..0c52c8eb5e6 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.140 2015/05/28 20:10:58 guenther Exp $ */ +/* $OpenBSD: cpu.h,v 1.141 2015/06/07 06:24:59 guenther Exp $ */ /* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */ /*- @@ -130,6 +130,7 @@ struct cpu_info { volatile u_int ci_mwait; #define MWAIT_IN_IDLE 0x1 /* don't need IPI to wake */ #define MWAIT_KEEP_IDLING 0x2 /* cleared by other cpus to wake me */ +#define MWAIT_ONLY 0x4 /* set if all idle states use mwait */ #define MWAIT_IDLING (MWAIT_IN_IDLE | MWAIT_KEEP_IDLING) int ci_want_resched; @@ -214,8 +215,6 @@ extern struct cpu_info *cpu_info[MAXCPUS]; extern void cpu_boot_secondary_processors(void); extern void cpu_init_idle_pcbs(void); -extern u_int cpu_mwait_size; - void cpu_kick(struct cpu_info *); void cpu_unidle(struct cpu_info *); @@ -336,6 +335,10 @@ extern int cpu_perf_ebx; extern int cpu_perf_edx; extern int cpu_apmi_edx; +/* cpu.c */ +extern u_int cpu_mwait_size; +extern u_int cpu_mwait_states; + /* machdep.c */ extern int cpu_apmhalt; extern int cpu_class; -- cgit v1.2.3