| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: cpu.h,v 1.90 2011/01/13 05:20:27 mrg Exp $ */ | | 1 | /* $NetBSD: cpu.h,v 1.91 2011/01/24 10:05:22 martin Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1992, 1993 | | 4 | * Copyright (c) 1992, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * This software was developed by the Computer Systems Engineering group | | 7 | * This software was developed by the Computer Systems Engineering group |
8 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | | 8 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and |
9 | * contributed to Berkeley. | | 9 | * contributed to Berkeley. |
10 | * | | 10 | * |
11 | * All advertising materials mentioning features or use of this software | | 11 | * All advertising materials mentioning features or use of this software |
12 | * must display the following acknowledgement: | | 12 | * must display the following acknowledgement: |
13 | * This product includes software developed by the University of | | 13 | * This product includes software developed by the University of |
14 | * California, Lawrence Berkeley Laboratory. | | 14 | * California, Lawrence Berkeley Laboratory. |
| @@ -141,26 +141,29 @@ void sparc_softintr_init(void); | | | @@ -141,26 +141,29 @@ void sparc_softintr_init(void); |
141 | (l)->l_cpu->ci_want_ast = 1; \ | | 141 | (l)->l_cpu->ci_want_ast = 1; \ |
142 | \ | | 142 | \ |
143 | /* Just interrupt the target CPU, so it can notice its AST */ \ | | 143 | /* Just interrupt the target CPU, so it can notice its AST */ \ |
144 | if ((l)->l_cpu->ci_cpuid != cpu_number()) \ | | 144 | if ((l)->l_cpu->ci_cpuid != cpu_number()) \ |
145 | XCALL0(sparc_noop, 1U << (l)->l_cpu->ci_cpuid); \ | | 145 | XCALL0(sparc_noop, 1U << (l)->l_cpu->ci_cpuid); \ |
146 | } while (/*CONSTCOND*/0) | | 146 | } while (/*CONSTCOND*/0) |
147 | | | 147 | |
148 | /* CPU architecture version */ | | 148 | /* CPU architecture version */ |
149 | extern int cpu_arch; | | 149 | extern int cpu_arch; |
150 | | | 150 | |
151 | /* Number of CPUs in the system */ | | 151 | /* Number of CPUs in the system */ |
152 | extern int sparc_ncpus; | | 152 | extern int sparc_ncpus; |
153 | | | 153 | |
| | | 154 | /* Provide %pc of a lwp */ |
| | | 155 | #define LWP_PC(l) ((l)->l_md.md_tf->tf_pc) |
| | | 156 | |
154 | /* | | 157 | /* |
155 | * Interrupt handler chains. Interrupt handlers should return 0 for | | 158 | * Interrupt handler chains. Interrupt handlers should return 0 for |
156 | * ``not me'' or 1 (``I took care of it''). intr_establish() inserts a | | 159 | * ``not me'' or 1 (``I took care of it''). intr_establish() inserts a |
157 | * handler into the list. The handler is called with its (single) | | 160 | * handler into the list. The handler is called with its (single) |
158 | * argument, or with a pointer to a clockframe if ih_arg is NULL. | | 161 | * argument, or with a pointer to a clockframe if ih_arg is NULL. |
159 | * | | 162 | * |
160 | * realfun/realarg are used to chain callers, usually with the | | 163 | * realfun/realarg are used to chain callers, usually with the |
161 | * biglock wrapper. | | 164 | * biglock wrapper. |
162 | */ | | 165 | */ |
163 | extern struct intrhand { | | 166 | extern struct intrhand { |
164 | int (*ih_fun)(void *); | | 167 | int (*ih_fun)(void *); |
165 | void *ih_arg; | | 168 | void *ih_arg; |
166 | struct intrhand *ih_next; | | 169 | struct intrhand *ih_next; |