10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #ifndef _CPU_ACPI_H
27 #define _CPU_ACPI_H
28
29 #include <sys/cpuvar.h>
30 #include <sys/acpi/acpi.h>
31 #include <sys/acpi/accommon.h>
32 #include <sys/acpi/acresrc.h>
33 #include <sys/acpica.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /*
40 * P-state related macros
41 */
42 #define CPU_ACPI_PPC(sp) sp->cs_ppc
43 #define CPU_ACPI_PSD(sp) sp->cs_psd
44 #define CPU_ACPI_PCT(sp) sp->cs_pct
45 #define CPU_ACPI_PCT_CTRL(sp) &sp->cs_pct[0]
46 #define CPU_ACPI_PCT_STATUS(sp) &sp->cs_pct[1]
47 #define CPU_ACPI_PSTATES(sp) sp->cs_pstates.ss_states
48 #define CPU_ACPI_PSTATES_COUNT(sp) sp->cs_pstates.ss_count
49
50 #define CPU_ACPI_FREQ(pstate) pstate->ps_freq
51 #define CPU_ACPI_PSTATE_TRANSLAT(pstate) pstate->ps_translat
52 #define CPU_ACPI_PSTATE_CTRL(pstate) pstate->ps_ctrl
|
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #ifndef _CPU_ACPI_H
27 #define _CPU_ACPI_H
28
29 #include <sys/cpuvar.h>
30
31 #include <acpica/include/acpi.h>
32 #include <acpica/include/accommon.h>
33 #include <acpica/include/acresrc.h>
34 #include <sys/acpica.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /*
41 * P-state related macros
42 */
43 #define CPU_ACPI_PPC(sp) sp->cs_ppc
44 #define CPU_ACPI_PSD(sp) sp->cs_psd
45 #define CPU_ACPI_PCT(sp) sp->cs_pct
46 #define CPU_ACPI_PCT_CTRL(sp) &sp->cs_pct[0]
47 #define CPU_ACPI_PCT_STATUS(sp) &sp->cs_pct[1]
48 #define CPU_ACPI_PSTATES(sp) sp->cs_pstates.ss_states
49 #define CPU_ACPI_PSTATES_COUNT(sp) sp->cs_pstates.ss_count
50
51 #define CPU_ACPI_FREQ(pstate) pstate->ps_freq
52 #define CPU_ACPI_PSTATE_TRANSLAT(pstate) pstate->ps_translat
53 #define CPU_ACPI_PSTATE_CTRL(pstate) pstate->ps_ctrl
|