summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-02-04 12:56:15 +0000
committergrehan <grehan@FreeBSD.org>2004-02-04 12:56:15 +0000
commit6a5c53abb63246e5af9fa4c880f09017047ea2ab (patch)
tree72418719129c0ac441ed6389b6ef19d1a35fa3dc /sys
parent506b2617301b6812d3d159a0d3ddbced596b3868 (diff)
downloadFreeBSD-src-6a5c53abb63246e5af9fa4c880f09017047ea2ab.zip
FreeBSD-src-6a5c53abb63246e5af9fa4c880f09017047ea2ab.tar.gz
Move temporary register save area from exception-vector memory to
per-CPU memory. This allows for interrupt handling on multiple CPUs. Obtained from: NetBSD
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/include/pcpu.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h
index a2c88c4..8c84ea2 100644
--- a/sys/powerpc/include/pcpu.h
+++ b/sys/powerpc/include/pcpu.h
@@ -34,13 +34,25 @@
#include <machine/cpufunc.h>
struct pmap;
+#define CPUSAVE_LEN 8
#define PCPU_MD_FIELDS \
int pc_inside_intr; \
- u_int32_t pc_next_asn; /* next ASN to alloc */ \
- u_int32_t pc_current_asngen; /* ASN rollover check */\
struct pmap *pc_curpmap; /* current pmap */ \
- struct thread *pc_fputhread /* current user of the fpu */
+ struct thread *pc_fputhread; /* current fpu user */ \
+ register_t pc_tempsave[CPUSAVE_LEN]; \
+ register_t pc_disisave[CPUSAVE_LEN]; \
+ register_t pc_ddbsave[CPUSAVE_LEN];
+
+/* Definitions for register offsets within the exception tmp save areas */
+#define CPUSAVE_R28 0 /* where r28 gets saved */
+#define CPUSAVE_R29 1 /* where r29 gets saved */
+#define CPUSAVE_R30 2 /* where r30 gets saved */
+#define CPUSAVE_R31 3 /* where r31 gets saved */
+#define CPUSAVE_DAR 4 /* where SPR_DAR gets saved */
+#define CPUSAVE_DSISR 5 /* where SPR_DSISR gets saved */
+#define CPUSAVE_SRR0 6 /* where SRR0 gets saved */
+#define CPUSAVE_SRR1 7 /* where SRR1 gets saved */
#define PCPUP ((struct pcpu *) powerpc_get_pcpup())
OpenPOWER on IntegriCloud