xref: /titanic_41/usr/src/uts/sun4/sys/x_call.h (revision 986fd29a0dc13f7608ef7f508f6e700bd7bc2720)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_X_CALL_H
28 #define	_SYS_X_CALL_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #define	XCALL_PIL 13	/* prom uses 14, and error handling uses 15 */
37 
38 #ifndef _ASM
39 
40 #include <sys/cpuvar.h>
41 
42 #if defined(_KERNEL)
43 
44 #if defined(_MACHDEP)
45 #define	CPU_XCALL_READY(cpuid)			\
46 	(CPU_IN_SET(cpu_ready_set, (cpuid)))
47 
48 extern cpuset_t cpu_ready_set;	/* cpus ready for x-calls */
49 #endif /* _MACHDEP */
50 
51 /*
52  * Cross-call function prototype.
53  */
54 typedef void xcfunc_t(uint64_t, uint64_t);
55 
56 /*
57  * Cross-call routines.
58  */
59 extern void xt_one(int, xcfunc_t *, uint64_t, uint64_t);
60 extern void xt_one_unchecked(int, xcfunc_t *, uint64_t, uint64_t);
61 extern void xt_all(xcfunc_t *, uint64_t, uint64_t);
62 extern void xc_one(int, xcfunc_t *, uint64_t, uint64_t);
63 extern void xc_init(void);
64 extern void xc_all(xcfunc_t *, uint64_t, uint64_t);
65 extern void xt_sync_tl1(uint64_t *);
66 extern void idle_stop_xcall(void);
67 
68 #if defined(_MACHDEP)
69 extern void xt_some(cpuset_t, xcfunc_t *, uint64_t, uint64_t);
70 extern void xt_sync(cpuset_t);
71 extern void xc_attention(cpuset_t);
72 extern void xc_dismissed(cpuset_t);
73 extern void xc_some(cpuset_t, xcfunc_t *, uint64_t, uint64_t);
74 #endif
75 
76 #endif	/* _KERNEL */
77 
78 #endif	/* !_ASM */
79 
80 #ifdef	__cplusplus
81 }
82 #endif
83 
84 #endif	/* _SYS_X_CALL_H */
85