fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * CDDL HEADER START
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * The contents of this file are subject to the terms of the
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Common Development and Distribution License (the "License").
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * You may not use this file except in compliance with the License.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * See the License for the specific language governing permissions
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * and limitations under the License.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * When distributing Covered Code, include this CDDL HEADER in each
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * If applicable, add the following below this CDDL HEADER, with the
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * fields enclosed by brackets "[]" replaced with your own identifying
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * information: Portions Copyright [yyyy] [name of copyright owner]
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * CDDL HEADER END
d3c9722485327eb5b96de2f2108e9a84bd46096dAlexander Kolbasov * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Processor Groups
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxeextern "C" {
d3c9722485327eb5b96de2f2108e9a84bd46096dAlexander Kolbasovtypedef int pgid_t; /* processor group id */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxetypedef uint_t pg_cid_t; /* processor group class id */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Nature of CPU relationships
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe * Processor Group callbacks ops vector
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe * These provide a mechanism allowing per PG routines to invoked
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe * in response to events.
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe void (*thread_swtch)(struct pg *, struct cpu *, hrtime_t,
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Processor group structure
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe pg_relation_t pg_relation; /* grouping relationship */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * PG class callbacks
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * PG class structure
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Per CPU processor group data
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe struct group cmt_pgs; /* CMT load balancing lineage */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe /* (Group hierarchy ordered) */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * PG cpu iterator cookie
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Initialize a PG CPU iterator cookie
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Return the first CPU in a PG
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe * Return the number of CPUs in a PG
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Framework routines
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxepg_cid_t pg_class_register(char *, struct pg_ops *, pg_relation_t);
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * PG CPU reconfiguration hooks
023e71de9e5670cebc23dd51162833661d3d2d3bHaik Aftandiliancpu_pg_t *pg_cpu_init(cpu_t *, boolean_t deferred_init);
023e71de9e5670cebc23dd51162833661d3d2d3bHaik Aftandilianvoid pg_cpu_fini(cpu_t *, cpu_pg_t *cpu_pg_deferred);
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * PG cpupart service hooks
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxevoid pg_cpupart_move(cpu_t *, struct cpupart *, struct cpupart *);
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * PG CPU utility routines
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe * PG Event callbacks
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxevoid pg_ev_thread_swtch(cpu_t *, hrtime_t, kthread_t *, kthread_t *);
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe * PG Observability interfaces
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe#endif /* !_KERNEL && !_KMEMUSER */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe#endif /* _PG_H */