dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / arch / x86 / include / sys / cpu.h
blob20f9e0290e5fc56a2815619cafbcaab32013bc3f
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_CPU_H
27 #define _SYS_CPU_H
30 * WARNING:
31 * This header file is Obsolete and may be deleted in a
32 * future release of Solaris.
36 * Include generic bustype cookies.
38 #include <sys/bustypes.h>
39 #include <sys/inttypes.h>
41 #if defined(_KERNEL)
42 #if defined(__xpv)
43 #include <sys/hypervisor.h>
44 #endif
45 #if defined(__GNUC__) && defined(_ASM_INLINES)
46 #include <asm/cpu.h>
47 #endif
48 #endif /* _KERNEL */
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
54 #if defined(_KERNEL)
55 extern void ht_pause(void);
56 extern void cli(void);
57 extern void sti(void);
58 extern void i86_halt(void);
59 extern void i86_monitor(volatile uint32_t *addr, uint32_t extensions,
60 uint32_t hints);
61 extern void i86_mwait(uint32_t data, uint32_t extensions);
64 * Used to insert cpu-dependent instructions into spin loops
66 #define SMT_PAUSE() ht_pause()
70 * C-state defines for the idle_state_transition DTrace probe
72 * The probe fires when the CPU undergoes an idle state change (e.g. C-state)
73 * The argument passed is the C-state to which the CPU is transitioning.
75 * These states will be shared by cpupm subsystem, so they should be kept in
76 * consistence with ACPI defined C states.
78 #define IDLE_STATE_C0 0
79 #define IDLE_STATE_C1 1
80 #define IDLE_STATE_C2 2
81 #define IDLE_STATE_C3 3
83 #endif /* _KERNEL */
85 #ifdef __cplusplus
87 #endif
89 #endif /* _SYS_CPU_H */