cma_cpu_arch.c revision 31e37bb439502e3f7c4c0a9a77d655ea5d56887a
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <cma.h>
#include <assert.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <strings.h>
#include <sys/processor.h>
extern ldom_hdl_t *cma_lhp;
/*ARGSUSED*/
int
{
}
/*ARGSUSED*/
int
{
int rc = 0;
} else {
return (-1);
}
return (-1);
}
return (rc);
}
int
{
int i;
return (CMA_RA_FAILURE);
}
/*
* cpu offlining using ldom_fmri_retire() may be asynchronous, so we
* have to set the timer and check the cpu status later.
*/
for (i = 0; i < cma.cma_cpu_tries;
break;
}
}
if (i >= cma.cma_cpu_tries) {
}
/*
* check to see if the cpu has been offline.
*/
/*
* Create a cpu node and add to the head of the cpu list
*/
if (cma.cma_cpu_timerid != 0)
return (CMA_RA_FAILURE);
}