vm_machdep.c (9d480d9edee5f26f72c6f754f031d7afc2c13d53) vm_machdep.c (1b1618fb125865af900298ff5d5a2c2bb77ecd34)
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

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

138 sf->sf_r4 = (u_int)fork_return;
139 sf->sf_r5 = (u_int)td2;
140 sf->sf_pc = (u_int)fork_trampoline;
141 tf->tf_spsr &= ~PSR_C_bit;
142 tf->tf_r0 = 0;
143 tf->tf_r1 = 0;
144 pcb2->un_32.pcb32_sp = (u_int)sf;
145
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

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

138 sf->sf_r4 = (u_int)fork_return;
139 sf->sf_r5 = (u_int)td2;
140 sf->sf_pc = (u_int)fork_trampoline;
141 tf->tf_spsr &= ~PSR_C_bit;
142 tf->tf_r0 = 0;
143 tf->tf_r1 = 0;
144 pcb2->un_32.pcb32_sp = (u_int)sf;
145
146 /* Setup to release sched_lock in fork_exit(). */
146 /* Setup to release spin count in fork_exit(). */
147 td2->td_md.md_spinlock_count = 1;
148 td2->td_md.md_saved_cspr = 0;
149 td2->td_md.md_tp = *(uint32_t **)ARM_TP_ADDRESS;
150}
151
152void
153cpu_thread_swapin(struct thread *td)
154{

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

283 sf->sf_r4 = (u_int)fork_return;
284 sf->sf_r5 = (u_int)td;
285 sf->sf_pc = (u_int)fork_trampoline;
286 tf->tf_spsr &= ~PSR_C_bit;
287 tf->tf_r0 = 0;
288 td->td_pcb->un_32.pcb32_sp = (u_int)sf;
289 td->td_pcb->un_32.pcb32_und_sp = td->td_kstack + USPACE_UNDEF_STACK_TOP;
290
147 td2->td_md.md_spinlock_count = 1;
148 td2->td_md.md_saved_cspr = 0;
149 td2->td_md.md_tp = *(uint32_t **)ARM_TP_ADDRESS;
150}
151
152void
153cpu_thread_swapin(struct thread *td)
154{

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

283 sf->sf_r4 = (u_int)fork_return;
284 sf->sf_r5 = (u_int)td;
285 sf->sf_pc = (u_int)fork_trampoline;
286 tf->tf_spsr &= ~PSR_C_bit;
287 tf->tf_r0 = 0;
288 td->td_pcb->un_32.pcb32_sp = (u_int)sf;
289 td->td_pcb->un_32.pcb32_und_sp = td->td_kstack + USPACE_UNDEF_STACK_TOP;
290
291 /* Setup to release sched_lock in fork_exit(). */
291 /* Setup to release spin count in fork_exit(). */
292 td->td_md.md_spinlock_count = 1;
293 td->td_md.md_saved_cspr = 0;
294}
295
296/*
297 * Set that machine state for performing an upcall that has to
298 * be done in thread_userret() so that those upcalls generated
299 * in thread_userret() itself can be done as well.

--- 333 unchanged lines hidden ---
292 td->td_md.md_spinlock_count = 1;
293 td->td_md.md_saved_cspr = 0;
294}
295
296/*
297 * Set that machine state for performing an upcall that has to
298 * be done in thread_userret() so that those upcalls generated
299 * in thread_userret() itself can be done as well.

--- 333 unchanged lines hidden ---