vm_machdep.c (122278) | vm_machdep.c (122292) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * Copyright (c) 1989, 1990 William Jolitz 4 * Copyright (c) 1994 John Dyson 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Systems Programming Group of the University of Utah Computer --- 27 unchanged lines hidden (view full) --- 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 40 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ 41 */ 42 43#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * Copyright (c) 1989, 1990 William Jolitz 4 * Copyright (c) 1994 John Dyson 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Systems Programming Group of the University of Utah Computer --- 27 unchanged lines hidden (view full) --- 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 40 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ 41 */ 42 43#include <sys/cdefs.h> |
44__FBSDID("$FreeBSD: head/sys/amd64/amd64/vm_machdep.c 122278 2003-11-08 02:39:46Z peter $"); | 44__FBSDID("$FreeBSD: head/sys/amd64/amd64/vm_machdep.c 122292 2003-11-08 03:33:38Z peter $"); |
45 46#include "opt_isa.h" 47#include "opt_kstack_pages.h" 48 49#include <sys/param.h> 50#include <sys/systm.h> 51#include <sys/malloc.h> 52#include <sys/proc.h> --- 60 unchanged lines hidden (view full) --- 113 114 p1 = td1->td_proc; 115 if ((flags & RFPROC) == 0) 116 return; 117 118 /* Ensure that p1's pcb is up to date. */ 119 savecrit = intr_disable(); 120 if (PCPU_GET(fpcurthread) == td1) | 45 46#include "opt_isa.h" 47#include "opt_kstack_pages.h" 48 49#include <sys/param.h> 50#include <sys/systm.h> 51#include <sys/malloc.h> 52#include <sys/proc.h> --- 60 unchanged lines hidden (view full) --- 113 114 p1 = td1->td_proc; 115 if ((flags & RFPROC) == 0) 116 return; 117 118 /* Ensure that p1's pcb is up to date. */ 119 savecrit = intr_disable(); 120 if (PCPU_GET(fpcurthread) == td1) |
121 npxsave(&td1->td_pcb->pcb_save); | 121 fpusave(&td1->td_pcb->pcb_save); |
122 intr_restore(savecrit); 123 124 /* Point the pcb to the top of the stack */ 125 pcb2 = (struct pcb *)(td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; 126 td2->td_pcb = pcb2; 127 128 /* Copy p1's pcb */ 129 bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); --- 71 unchanged lines hidden (view full) --- 201 mdp = &td->td_proc->p_md; 202} 203 204void 205cpu_thread_exit(struct thread *td) 206{ 207 208 if (td == PCPU_GET(fpcurthread)) | 122 intr_restore(savecrit); 123 124 /* Point the pcb to the top of the stack */ 125 pcb2 = (struct pcb *)(td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; 126 td2->td_pcb = pcb2; 127 128 /* Copy p1's pcb */ 129 bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); --- 71 unchanged lines hidden (view full) --- 201 mdp = &td->td_proc->p_md; 202} 203 204void 205cpu_thread_exit(struct thread *td) 206{ 207 208 if (td == PCPU_GET(fpcurthread)) |
209 npxdrop(); | 209 fpudrop(); |
210} 211 212void 213cpu_thread_clean(struct thread *td) 214{ 215} 216 217void --- 43 unchanged lines hidden (view full) --- 261 * 262 * XXXKSE It might be a good idea to simply skip this as 263 * the values of the other registers may be unimportant. 264 * This would remove any requirement for knowing the KSE 265 * at this time (see the matching comment below for 266 * more analysis) (need a good safe default). 267 */ 268 bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); | 210} 211 212void 213cpu_thread_clean(struct thread *td) 214{ 215} 216 217void --- 43 unchanged lines hidden (view full) --- 261 * 262 * XXXKSE It might be a good idea to simply skip this as 263 * the values of the other registers may be unimportant. 264 * This would remove any requirement for knowing the KSE 265 * at this time (see the matching comment below for 266 * more analysis) (need a good safe default). 267 */ 268 bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); |
269 pcb2->pcb_flags &= ~PCB_NPXINITDONE; | 269 pcb2->pcb_flags &= ~PCB_FPUINITDONE; |
270 271 /* 272 * Create a new fresh stack for the new thread. 273 * Don't forget to set this stack value into whatever supplies 274 * the address for the fault handlers. 275 * The contexts are filled in at the time we actually DO the 276 * upcall as only then do we know which KSE we got. 277 */ --- 205 unchanged lines hidden --- | 270 271 /* 272 * Create a new fresh stack for the new thread. 273 * Don't forget to set this stack value into whatever supplies 274 * the address for the fault handlers. 275 * The contexts are filled in at the time we actually DO the 276 * upcall as only then do we know which KSE we got. 277 */ --- 205 unchanged lines hidden --- |