cpu_pm.h revision 113b131b48d0e653a91612bb4461ea90adbd849a
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* 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
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CPU_PM_H
#define _CPU_PM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/processor.h>
/*
* CPU Power Manager Policies
*/
typedef enum cpupm_policy {
/*
* Power Managable CPU Domain Types
*/
typedef enum cpupm_dtype {
CPUPM_DTYPE_ACTIVE, /* Active Power Domain */
CPUPM_DTYPE_IDLE /* Idle Power Domain */
/*
* CPUPM state names for policy implementation.
* The last element is used to size the enumeration.
*/
typedef enum cpupm_state_name {
/*
* Possible states for the domain's transience governor
*/
typedef enum cpupm_gov_state_t {
CPUPM_GOV_TRANS_IDLE, /* Transient idleness, lowerings disabled */
CPUPM_GOV_TRANS_WORK /* Transient work, raises disabled */
/*
* Utilization events delivered by the dispatcher.
*/
typedef enum cpupm_util_event {
/*
* CPU Power Domain State
*/
typedef struct cpupm_state {
/*
* CPU Power Domain
*/
typedef struct cpupm_domain {
int cpd_ti; /* transient idle history */
int cpd_tw; /* transient work history */
struct cpupm_domain *cpd_next;
/*
* CPU power manager domain management interfaces
*/
cpupm_state_t *);
extern void cpupm_redefine_max_activepwr_state(struct cpu *, int);
/*
* CPU power manager policy engine interfaces
*/
cpupm_policy_t cpupm_get_policy(void);
/*
* CPU power platform driver interfaces
*/
cpupm_state_t *);
#endif /* !_KERNEL && !_KMEMUSER */
#ifdef __cplusplus
}
#endif
#endif /* _CPU_PM_H */