/*
* 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.
*/
/*
* Copyright (c) 2009, Intel Corporation.
* All rights reserved.
*/
/*
* Platform Power Management master pseudo driver platform support.
*/
/*
* Used by ppm_redefine_topspeed() to set the highest power level of all CPUs
* in a domain.
*/
void
{
}
/*
* Redefine the highest power level for all CPUs in a domain. This
* functionality is necessary because ACPI uses the _PPC to define
* a CPU's highest power level *and* allows the _PPC to be redefined
* dynamically. _PPC changes are communicated through _PPC change
* notifications caught by the CPU device driver.
*/
void
{
int topspeed;
if (cpupm_get_topspeed_callb == NULL ||
cpupm_set_topspeed_callb == NULL) {
"since cpupm interfaces are not initialized", str,
return;
}
"notification before PPMD_CPU_READY", str,
return;
}
/*
* Process each CPU in the domain.
*/
}
}
/*
* For x86 platforms CPU domains must be built dynamically at bootime.
* Until the domains have been built, refuse all power transition
* requests.
*/
/* ARGSUSED */
{
"before it was ready dip(0x%p)", (void *)dip));
return (B_TRUE);
}
*result = DDI_FAILURE;
return (B_FALSE);
}
int
{
#ifdef DEBUG
#endif
int oldlevel;
int ret;
return (DDI_SUCCESS);
/* bring each cpu to next level */
if (ret == DDI_SUCCESS) {
continue;
}
/*
* If the driver was unable to lower cpu speed,
* the cpu probably got busy; set the previous
* cpus back to the original level
*/
return (ret);
}
return (DDI_SUCCESS);
}
/*
* allocate ppm CPU pstate domain if non-existence,
* otherwise, add the CPU to the corresponding ppm
* CPU pstate domain.
*/
void
{
int sub_domain;
/*
* There are two purposes of sub_domain:
* 1. skip the orignal ppm CPU domain generated by ppm.conf
* 2. A CPU ppm domain could have several pstate domains indeed.
*/
/*
* Find ppm CPU pstate domain
*/
break;
}
}
/*
* Create one ppm CPU pstate domain if no found
*/
KM_SLEEP);
ppm_domain_p = domp;
}
/*
* We found one matched ppm CPU pstate domain,
* add cpu to this domain
*/
else {
KM_SLEEP);
}
}
/*
* remove CPU from the corresponding ppm CPU pstate
* domain. We only remove CPU from conflist here.
*/
void
{
/*
* get ppm CPU pstate domain
*/
/*
* remove CPU from conflist
*/
continue;
}
}
}