pg.h revision fb2f18f820d90b001aea4fb27dd654bc1263c440
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _PG_H
#define _PG_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Processor Groups
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/processor.h>
/*
* Nature of CPU relationships
*/
typedef enum pg_relation {
/*
* Processor group structure
*/
typedef struct pg {
} pg_t;
/*
* PG class callbacks
*/
struct pg_ops {
void (*cpu_active)(struct cpu *);
void (*cpu_inactive)(struct cpu *);
struct cpupart *);
};
#define PG_CLASS_NAME_MAX 32
/*
* PG class structure
*/
typedef struct pg_class {
char pgc_name[PG_CLASS_NAME_MAX];
} pg_class_t;
/*
* Per CPU processor group data
*/
typedef struct cpu_pg {
/* (Group hierarchy ordered) */
} cpu_pg_t;
/*
* PG cpu iterator cookie
*/
typedef struct pg_cpu_itr {
} pg_cpu_itr_t;
/*
* Initialize a PG CPU iterator cookie
*/
{ \
}
/*
* Return the first CPU in a PG
*/
#define PG_CPU_GET_FIRST(pgrp) \
/*
* Framework routines
*/
void pg_init(void);
/*
* PG CPU reconfiguration hooks
*/
void pg_cpu0_init(void);
void pg_cpu_init(cpu_t *);
void pg_cpu_fini(cpu_t *);
void pg_cpu_active(cpu_t *);
void pg_cpu_inactive(cpu_t *);
void pg_cpu_startup(cpu_t *);
void pg_cpu_bootstrap(cpu_t *);
/*
* PG cpupart service hooks
*/
/*
* PG CPU utility routines
*/
void pg_destroy(pg_t *);
#endif /* !_KERNEL && !_KMEMUSER */
#ifdef __cplusplus
}
#endif
#endif /* _PG_H */