/*
* 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
*/
/*
*/
extern pri_t maxclsyspri;
int rdsv3_enable_snd_cq = 0;
int rdsv3_intr_line_up_mode = 0;
void
{
int i;
int *msix;
extern int ncpus;
if (ncpus < RDSV3_CPUID_POOL_MAX)
else
/* hold cpu_lock before calling cpu_get and cpu_is_online */
for (i = 0; i < rdsv3_cpuid_pool_cnt; i++) {
else
}
/* remove the hca MSI-x interrupt cpu's */
for (i = 0; i < nmsix; i++) {
rdsv3_msix_pool[i] = msix[i];
}
}
DDI_PROP_DONTPASS, "EnableSendCQ", 0);
DDI_PROP_DONTPASS, "IntrLineUpMode", 0);
}
static void
{
int i, j, k, idx;
for (i = 0; i < rdsv3_cpuid_pool_cnt; i++) {
if (!(rdsv3_cpuid_pool[i] & (RDSV3_CPUFLAGS_UNAVAIL |
hcagp->g_hca_cpuid = i;
break;
}
/* share an assigned cpu */
for (j = 0; j < rdsv3_cpuid_pool_cnt; j++) {
if (!(rdsv3_cpuid_pool[j] & (RDSV3_CPUFLAGS_UNAVAIL |
RDSV3_CPUFLAGS_HCA))) {
hcagp->g_hca_cpuid = j;
break;
}
}
/* if the code comes down here, cpu 0 will be used */
}
for (j = 0; j < RDSV3_AFT_CONN_CPU_POOL; j++) {
/* initialize to be an out-of-bound cpuid, no binding */
for (i = 0; i < rdsv3_cpuid_pool_cnt; i++) {
if (!(rdsv3_cpuid_pool[i] & (RDSV3_CPUFLAGS_UNAVAIL |
hcagp->g_conn_cpuid_pool[j] = i;
break;
}
}
if (i >= rdsv3_cpuid_pool_cnt)
break;
}
if (j >= RDSV3_AFT_CONN_CPU_POOL) {
return;
}
/* avoid the primary group */
for (k = 0, idx = 0; k < 2; k++) {
/* search to the start of an hca group */
for (i = idx; i < rdsv3_cpuid_pool_cnt; i++) {
if (rdsv3_cpuid_pool[i] & RDSV3_CPUFLAGS_HCA) {
idx = i + 1;
break;
}
}
}
/* share an assigned cpu */
for (; j < RDSV3_AFT_CONN_CPU_POOL; j++) {
for (i = idx; i < rdsv3_cpuid_pool_cnt; i++) {
if (!(rdsv3_cpuid_pool[i] & (RDSV3_CPUFLAGS_UNAVAIL |
RDSV3_CPUFLAGS_HCA))) {
hcagp->g_conn_cpuid_pool[j] = i;
idx = i + 1;
break;
}
}
}
}
{
if (!hcagp)
return (NULL);
return (hcagp);
}
void
{
return;
}
void
{
}
{
return (hcagp->g_sched_hdl);
}
{
if (ibt_cq_hdl == NULL)
return (NULL);
return (NULL);
hcagp->g_conn_cpuid_idx = 0;
if (rdsv3_intr_line_up_mode) {
} else {
rdsv3_msix_pool[0]);
}
}
return (ringp);
}
{
return (NULL);
if (flag & SCQ_WRK_BIND_CPU)
pri = maxclsyspri;
else
pri = maxclsyspri;
/* set the bind CPU to -1 to indicate no thread affinity set */
if (flag & SCQ_BIND_CPU) {
if (flag & SCQ_HCA_BIND_CPU) {
} else if (flag & SCQ_WRK_BIND_CPU) {
}
}
return (ringp);
}
void
{
/* wait until the af_thr has gone to sleep */
}
}
}
void
{
}
}
static void
{
for (;;) {
}
/*
* Either we have work to do, or we have been asked to
* shutdown
*/
goto done;
}
done:
thread_exit();
}
/*
* Bind a soft ring worker thread to supplied CPU.
*/
cpu_t *
{
if (rdsv3_af_thr_thread_bind == 0) {
return (NULL);
}
return (NULL);
if (clear)
return (cp);
}
/*
* Un Bind a soft ring worker thread.
*/
static void
{
return;
}
}