diff options
author | bholler <none@none> | 2007-06-15 16:39:48 -0700 |
---|---|---|
committer | bholler <none@none> | 2007-06-15 16:39:48 -0700 |
commit | f98fbcec489fdf363410d0c1cedc2baff1d60d9c (patch) | |
tree | a70dc97afd8926744fddaacb102b22d2aafa1de9 /usr/src/uts/intel/sys | |
parent | 758f6e0b258f20dcb5b772642e2a18b998ee7927 (diff) | |
download | illumos-joyent-f98fbcec489fdf363410d0c1cedc2baff1d60d9c.tar.gz |
6495392 use monitor/mwait for halting idle CPUs where supported
Diffstat (limited to 'usr/src/uts/intel/sys')
-rw-r--r-- | usr/src/uts/intel/sys/cpu.h | 11 | ||||
-rw-r--r-- | usr/src/uts/intel/sys/x86_archext.h | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/usr/src/uts/intel/sys/cpu.h b/usr/src/uts/intel/sys/cpu.h index 07a81e38de..8f4d5af138 100644 --- a/usr/src/uts/intel/sys/cpu.h +++ b/usr/src/uts/intel/sys/cpu.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,6 +38,7 @@ * Include generic bustype cookies. */ #include <sys/bustypes.h> +#include <sys/inttypes.h> #if defined(__GNUC__) && defined(_ASM_INLINES) && defined(_KERNEL) #include <asm/cpu.h> #endif @@ -52,6 +52,9 @@ extern void ht_pause(void); extern void cli(void); extern void sti(void); extern void i86_halt(void); +extern void i86_monitor(volatile uint32_t *addr, uint32_t extensions, + uint32_t hints); +extern void i86_mwait(uint32_t data, uint32_t extensions); /* * Used to insert cpu-dependent instructions into spin loops diff --git a/usr/src/uts/intel/sys/x86_archext.h b/usr/src/uts/intel/sys/x86_archext.h index d637f9b284..9e0bde9041 100644 --- a/usr/src/uts/intel/sys/x86_archext.h +++ b/usr/src/uts/intel/sys/x86_archext.h @@ -365,12 +365,13 @@ typedef struct mtrrvar { #define X86_CX16 0x00080000 #define X86_CMP 0x00100000 #define X86_TSCP 0x00200000 +#define X86_MWAIT 0x00400000 #define X86_CPUID 0x01000000 #define FMT_X86_FEATURE \ "\20" \ "\31cpuid" \ - "\26tscp\25cmp\24cx16\23sse3\22nx\21asysc" \ + "\27mwait\26tscp\25cmp\24cx16\23sse3\22nx\21asysc" \ "\20htt\17sse2\16sse\15sep\14pat\13cx8\12pae\11mca" \ "\10mmx\7cmov\6de\5pge\4mtrr\3msr\2tsc\1lgpg" @@ -581,6 +582,7 @@ extern void add_cpunode2devtree(processorid_t, struct cpuid_info *); extern void cpuid_get_addrsize(struct cpu *, uint_t *, uint_t *); extern uint_t cpuid_get_dtlb_nent(struct cpu *, size_t); +extern size_t cpuid_get_mwait_size(struct cpu *cpu); extern uint_t workaround_errata(struct cpu *); |