1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-31 12:13:10 +00:00

On Xscale, use the minicache for the kernel stack.

This commit is contained in:
Olivier Houchard 2004-09-23 22:24:12 +00:00
parent 9979f39280
commit 04aebdab36
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135657

View File

@ -145,16 +145,21 @@ cpu_fork(register struct thread *td1, register struct proc *p2,
struct trapframe *tf;
struct switchframe *sf;
struct mdproc *mdp2;
vm_offset_t uarea = td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE
- USPACE;
pcb1 = td1->td_pcb;
pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1;
#ifdef __XSCALE__
pmap_use_minicache(td2->td_kstack, td2->td_kstack_pages * PAGE_SIZE);
#endif
td2->td_pcb = pcb2;
bcopy(td1->td_pcb, pcb2, sizeof(*pcb2));
mdp2 = &p2->p_md;
bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2));
pcb2->un_32.pcb32_und_sp = (u_int)td2->td_kstack + USPACE_UNDEF_STACK_TOP;
pcb2->un_32.pcb32_sp = (u_int)td2->td_kstack +
USPACE_SVC_STACK_TOP;
pcb2->un_32.pcb32_und_sp = uarea + USPACE_UNDEF_STACK_TOP;
pcb2->un_32.pcb32_sp = uarea +
USPACE_SVC_STACK_TOP - sizeof(*pcb2);
pmap_activate(td2);
td2->td_frame = tf =
(struct trapframe *)pcb2->un_32.pcb32_sp - 1;
@ -165,6 +170,7 @@ cpu_fork(register struct thread *td1, register struct proc *p2,
sf->sf_pc = (u_int)fork_trampoline;
tf->tf_spsr &= ~PSR_C_bit;
tf->tf_r0 = 0;
tf->tf_r1 = 0;
pcb2->un_32.pcb32_sp = (u_int)sf;
}
@ -327,7 +333,6 @@ cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg)
struct switchframe *sf;
struct trapframe *tf;
tf = td->td_frame;
sf = (struct switchframe *)tf - 1;
sf->sf_r4 = (u_int)func;