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 #pragma ident "%Z%%M% %I% %E% SMI"
28
29 #if defined(lint)
30 #include <sys/types.h>
31 #include <sys/cpuvar.h>
32 #else /*lint */
33 #include "assym.h"
34 #endif /* lint */
35
36 #include <sys/param.h>
37 #include <sys/asm_linkage.h>
38 #include <sys/errno.h>
39 #include <sys/intreg.h>
40 #include <sys/intr.h>
41 #include <sys/x_call.h>
42 #include <sys/privregs.h>
43 #include <sys/machthread.h>
44 #include <sys/machtrap.h>
45 #include <sys/xc_impl.h>
46 #include <sys/bitmap.h>
47
48 #ifdef TRAPTRACE
49 #include <sys/traptrace.h>
50 #endif /* TRAPTRACE */
51
52
53 #if defined(lint)
54
55 /* ARGSUSED */
56 void
57 send_self_xcall(struct cpu *cpu, uint64_t arg1, uint64_t arg2, xcfunc_t *func)
58 {}
59
60 #else
61 /*
62 * For a x-trap request to the same processor, just send a fast trap.
63 * Does not accept inums.
64 */
65 ENTRY_NP(send_self_xcall)
66 ta ST_SELFXCALL
67 retl
68 nop
69 SET_SIZE(send_self_xcall)
70 #endif /* lint */
71
72 #if defined(lint)
73 void
74 idle_stop_xcall(void)
75 {}
76 #else
77 /*
78 * idle or stop xcall handler.
79 *
80 * Called in response to an xt_some initiated by idle_other_cpus
81 * and stop_other_cpus.
82 *
83 * Entry:
84 * %g1 - handler at TL==0
85 *
86 * Register Usage:
87 * %g1 - preserved
88 * %g4 - pil
89 *
90 * %g1 will either be cpu_idle_self or cpu_stop_self and is
91 * passed to sys_trap, to run at TL=0. No need to worry about
92 * the regp passed to cpu_idle_self/cpu_stop_self, since
93 * neither require arguments.
94 */
95 ENTRY_NP(idle_stop_xcall)
96 rdpr %pil, %g4
97 cmp %g4, XCALL_PIL
98 ba,pt %xcc, sys_trap
99 movl %xcc, XCALL_PIL, %g4
100 SET_SIZE(idle_stop_xcall)
101
102 #endif /* lint */
103
|
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 #include "assym.h"
28
29 #include <sys/param.h>
30 #include <sys/asm_linkage.h>
31 #include <sys/errno.h>
32 #include <sys/intreg.h>
33 #include <sys/intr.h>
34 #include <sys/x_call.h>
35 #include <sys/privregs.h>
36 #include <sys/machthread.h>
37 #include <sys/machtrap.h>
38 #include <sys/xc_impl.h>
39 #include <sys/bitmap.h>
40
41 #ifdef TRAPTRACE
42 #include <sys/traptrace.h>
43 #endif /* TRAPTRACE */
44
45
46 /*
47 * For a x-trap request to the same processor, just send a fast trap.
48 * Does not accept inums.
49 */
50 ENTRY_NP(send_self_xcall)
51 ta ST_SELFXCALL
52 retl
53 nop
54 SET_SIZE(send_self_xcall)
55
56 /*
57 * idle or stop xcall handler.
58 *
59 * Called in response to an xt_some initiated by idle_other_cpus
60 * and stop_other_cpus.
61 *
62 * Entry:
63 * %g1 - handler at TL==0
64 *
65 * Register Usage:
66 * %g1 - preserved
67 * %g4 - pil
68 *
69 * %g1 will either be cpu_idle_self or cpu_stop_self and is
70 * passed to sys_trap, to run at TL=0. No need to worry about
71 * the regp passed to cpu_idle_self/cpu_stop_self, since
72 * neither require arguments.
73 */
74 ENTRY_NP(idle_stop_xcall)
75 rdpr %pil, %g4
76 cmp %g4, XCALL_PIL
77 ba,pt %xcc, sys_trap
78 movl %xcc, XCALL_PIL, %g4
79 SET_SIZE(idle_stop_xcall)
80
|