xref: /onnv-gate/usr/src/uts/sun4/sys/cpupm_mach.h (revision 8906:e559381f1e2b)
1*8906SEric.Saxe@Sun.COM /*
2*8906SEric.Saxe@Sun.COM  * CDDL HEADER START
3*8906SEric.Saxe@Sun.COM  *
4*8906SEric.Saxe@Sun.COM  * The contents of this file are subject to the terms of the
5*8906SEric.Saxe@Sun.COM  * Common Development and Distribution License (the "License").
6*8906SEric.Saxe@Sun.COM  * You may not use this file except in compliance with the License.
7*8906SEric.Saxe@Sun.COM  *
8*8906SEric.Saxe@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*8906SEric.Saxe@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*8906SEric.Saxe@Sun.COM  * See the License for the specific language governing permissions
11*8906SEric.Saxe@Sun.COM  * and limitations under the License.
12*8906SEric.Saxe@Sun.COM  *
13*8906SEric.Saxe@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*8906SEric.Saxe@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*8906SEric.Saxe@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*8906SEric.Saxe@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*8906SEric.Saxe@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*8906SEric.Saxe@Sun.COM  *
19*8906SEric.Saxe@Sun.COM  * CDDL HEADER END
20*8906SEric.Saxe@Sun.COM  */
21*8906SEric.Saxe@Sun.COM /*
22*8906SEric.Saxe@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*8906SEric.Saxe@Sun.COM  * Use is subject to license terms.
24*8906SEric.Saxe@Sun.COM  */
25*8906SEric.Saxe@Sun.COM 
26*8906SEric.Saxe@Sun.COM #ifndef	_CPUPM_MACH_H
27*8906SEric.Saxe@Sun.COM #define	_CPUPM_MACH_H
28*8906SEric.Saxe@Sun.COM 
29*8906SEric.Saxe@Sun.COM #ifdef __cplusplus
30*8906SEric.Saxe@Sun.COM extern "C" {
31*8906SEric.Saxe@Sun.COM #endif
32*8906SEric.Saxe@Sun.COM 
33*8906SEric.Saxe@Sun.COM /*
34*8906SEric.Saxe@Sun.COM  * Convert speed to Hz.
35*8906SEric.Saxe@Sun.COM  */
36*8906SEric.Saxe@Sun.COM #define	CPUPM_SPEED_HZ(mhz, divisor) (((uint64_t)mhz * 1000000) / divisor)
37*8906SEric.Saxe@Sun.COM 
38*8906SEric.Saxe@Sun.COM #ifdef __cplusplus
39*8906SEric.Saxe@Sun.COM }
40*8906SEric.Saxe@Sun.COM #endif
41*8906SEric.Saxe@Sun.COM 
42*8906SEric.Saxe@Sun.COM #endif	/* _CPUPM_MACH_H */
43