Deleted Added
full compact
vm_machdep.c (190620) vm_machdep.c (195486)
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 * from: @(#)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 * from: @(#)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 190620 2009-04-01 13:09:26Z kib $");
44__FBSDID("$FreeBSD: head/sys/amd64/amd64/vm_machdep.c 195486 2009-07-09 09:34:11Z kib $");
45
46#include "opt_isa.h"
47#include "opt_cpu.h"
48#include "opt_compat.h"
49
50#include <sys/param.h>
51#include <sys/systm.h>
52#include <sys/bio.h>

--- 128 unchanged lines hidden (view full) ---

181
182 /* Setup to release spin count in fork_exit(). */
183 td2->td_md.md_spinlock_count = 1;
184 td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
185
186 /* As an i386, do not copy io permission bitmap. */
187 pcb2->pcb_tssp = NULL;
188
45
46#include "opt_isa.h"
47#include "opt_cpu.h"
48#include "opt_compat.h"
49
50#include <sys/param.h>
51#include <sys/systm.h>
52#include <sys/bio.h>

--- 128 unchanged lines hidden (view full) ---

181
182 /* Setup to release spin count in fork_exit(). */
183 td2->td_md.md_spinlock_count = 1;
184 td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
185
186 /* As an i386, do not copy io permission bitmap. */
187 pcb2->pcb_tssp = NULL;
188
189 /* New segment registers. */
190 pcb2->pcb_full_iret = 1;
191
189 /* Copy the LDT, if necessary. */
190 mdp1 = &td1->td_proc->p_md;
191 mdp2 = &p2->p_md;
192 mtx_lock(&dt_lock);
193 if (mdp1->md_ldt != NULL) {
194 if (flags & RFMEM) {
195 mdp1->md_ldt->ldt_refcnt++;
196 mdp2->md_ldt = mdp1->md_ldt;

--- 134 unchanged lines hidden (view full) ---

331
332 /*
333 * Copy the upcall pcb. This loads kernel regs.
334 * Those not loaded individually below get their default
335 * values here.
336 */
337 bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
338 pcb2->pcb_flags &= ~PCB_FPUINITDONE;
192 /* Copy the LDT, if necessary. */
193 mdp1 = &td1->td_proc->p_md;
194 mdp2 = &p2->p_md;
195 mtx_lock(&dt_lock);
196 if (mdp1->md_ldt != NULL) {
197 if (flags & RFMEM) {
198 mdp1->md_ldt->ldt_refcnt++;
199 mdp2->md_ldt = mdp1->md_ldt;

--- 134 unchanged lines hidden (view full) ---

334
335 /*
336 * Copy the upcall pcb. This loads kernel regs.
337 * Those not loaded individually below get their default
338 * values here.
339 */
340 bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
341 pcb2->pcb_flags &= ~PCB_FPUINITDONE;
342 pcb2->pcb_full_iret = 1;
339
340 /*
341 * Create a new fresh stack for the new thread.
342 */
343 bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe));
344
345 /* If the current thread has the trap bit set (i.e. a debugger had
346 * single stepped the process to the system call), we need to clear

--- 98 unchanged lines hidden (view full) ---

445
446#ifdef COMPAT_IA32
447 if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
448 td->td_pcb->pcb_gsbase = (register_t)tls_base;
449 return (0);
450 }
451#endif
452 td->td_pcb->pcb_fsbase = (register_t)tls_base;
343
344 /*
345 * Create a new fresh stack for the new thread.
346 */
347 bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe));
348
349 /* If the current thread has the trap bit set (i.e. a debugger had
350 * single stepped the process to the system call), we need to clear

--- 98 unchanged lines hidden (view full) ---

449
450#ifdef COMPAT_IA32
451 if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
452 td->td_pcb->pcb_gsbase = (register_t)tls_base;
453 return (0);
454 }
455#endif
456 td->td_pcb->pcb_fsbase = (register_t)tls_base;
457 td->td_pcb->pcb_full_iret = 1;
453 return (0);
454}
455
456#ifdef SMP
457static void
458cpu_reset_proxy()
459{
460

--- 166 unchanged lines hidden ---
458 return (0);
459}
460
461#ifdef SMP
462static void
463cpu_reset_proxy()
464{
465

--- 166 unchanged lines hidden ---