xref: /illumos-gate/usr/src/uts/sun4/sys/cpupm_mach.h (revision 0e751525)
17f606aceSMark Haywood /*
27f606aceSMark Haywood  * CDDL HEADER START
37f606aceSMark Haywood  *
47f606aceSMark Haywood  * The contents of this file are subject to the terms of the
57f606aceSMark Haywood  * Common Development and Distribution License (the "License").
67f606aceSMark Haywood  * You may not use this file except in compliance with the License.
77f606aceSMark Haywood  *
87f606aceSMark Haywood  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97f606aceSMark Haywood  * or http://www.opensolaris.org/os/licensing.
107f606aceSMark Haywood  * See the License for the specific language governing permissions
117f606aceSMark Haywood  * and limitations under the License.
127f606aceSMark Haywood  *
137f606aceSMark Haywood  * When distributing Covered Code, include this CDDL HEADER in each
147f606aceSMark Haywood  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157f606aceSMark Haywood  * If applicable, add the following below this CDDL HEADER, with the
167f606aceSMark Haywood  * fields enclosed by brackets "[]" replaced with your own identifying
177f606aceSMark Haywood  * information: Portions Copyright [yyyy] [name of copyright owner]
187f606aceSMark Haywood  *
197f606aceSMark Haywood  * CDDL HEADER END
207f606aceSMark Haywood  */
217f606aceSMark Haywood /*
22*0e751525SEric Saxe  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237f606aceSMark Haywood  * Use is subject to license terms.
247f606aceSMark Haywood  */
257f606aceSMark Haywood 
26*0e751525SEric Saxe #ifndef	_CPUPM_MACH_H
27*0e751525SEric Saxe #define	_CPUPM_MACH_H
287f606aceSMark Haywood 
297f606aceSMark Haywood #ifdef __cplusplus
307f606aceSMark Haywood extern "C" {
317f606aceSMark Haywood #endif
327f606aceSMark Haywood 
33*0e751525SEric Saxe /*
34*0e751525SEric Saxe  * Convert speed to Hz.
35*0e751525SEric Saxe  */
36*0e751525SEric Saxe #define	CPUPM_SPEED_HZ(mhz, divisor) (((uint64_t)mhz * 1000000) / divisor)
377f606aceSMark Haywood 
387f606aceSMark Haywood #ifdef __cplusplus
397f606aceSMark Haywood }
407f606aceSMark Haywood #endif
417f606aceSMark Haywood 
42*0e751525SEric Saxe #endif	/* _CPUPM_MACH_H */
43