px_cb.c revision f8d2de6bd2421da1926f3daa456d161670decdf7
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* PX Control Block object
*/
#include <sys/ddi_impldefs.h>
#include <sys/machsystm.h>
#include "px_obj.h"
/*LINTLIBRARY*/
int
{
int i;
/* if fail to get sysino, no need to proceed */
return (DDI_FAILURE);
/*
* allocating JBC common block
*/
cb_p->xbc_attachcnt++;
} else {
/* Find the next empty slot */
for (i = 0; i < PX_CB_MAX_LEAF; i++) {
break;
}
}
/* Make sure we were able to find a empty bucket */
ASSERT(i < PX_CB_MAX_LEAF);
cb_p->xbc_attachcnt++;
return (DDI_SUCCESS);
}
/*
* initialize XBC fault data structure
* this happens on first attaching instance on sun4u,
* and every instance on sun4v.
*/
/* activate JBC fault interrupt if not yet activated */
}
void
{
int i;
for (i = 0; i < PX_CB_MAX_LEAF; i++) {
}
cb_p->xbc_attachcnt--;
if (cb_p->xbc_attachcnt > 0) {
return;
}
}