summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-08-02 17:35:00 +0000
committerjkim <jkim@FreeBSD.org>2010-08-02 17:35:00 +0000
commit79a57d111a564cdef116d6cf2c34b1842377129d (patch)
treeac5b6c35aff67637e32c04209fa5f534aa1806b7 /sys/amd64/amd64/mp_machdep.c
parent0a86131c629fc0f57598850ae76df2002f261b3e (diff)
downloadFreeBSD-src-79a57d111a564cdef116d6cf2c34b1842377129d.zip
FreeBSD-src-79a57d111a564cdef116d6cf2c34b1842377129d.tar.gz
- Merge savectx2() with savectx() and struct xpcb with struct pcb. [1]
savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs). Thus, saving additional information does not hurt and it may be even beneficial. Unfortunately, struct pcb has grown larger to accommodate more data. Move 512-byte long pcb_user_save to the end of struct pcb while I am here. - savectx() now saves FPU state unconditionally and copy it to the PCB of FPU thread if necessary. This gives panic dump and kdb a chance to take a look at the current FPU state even if the FPU is "supposedly" not used. - Resuming CPU now unconditionally reinitializes FPU. If the saved FPU state was irrelevant, it could be in an unknown state. Suggested by: bde [1]
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 0bda9fe..22ad40a 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -100,7 +100,7 @@ char *nmi_stack;
void *dpcpu;
struct pcb stoppcbs[MAXCPU];
-struct xpcb **stopxpcbs = NULL;
+struct pcb **susppcbs = NULL;
/* Variables needed for SMP tlb shootdown. */
vm_offset_t smp_tlb_addr1;
@@ -1336,7 +1336,7 @@ cpususpend_handler(void)
rf = intr_disable();
cr3 = rcr3();
- if (savectx2(stopxpcbs[cpu])) {
+ if (savectx(susppcbs[cpu])) {
wbinvd();
atomic_set_int(&stopped_cpus, cpumask);
}
OpenPOWER on IntegriCloud