In cpu_thread_setup(), set md_pcbpaddr to the physical address of

the pcb. We use the physical address for context switching.
While here, fix a nearby style(9) bug.
This commit is contained in:
Marcel Moolenaar 2003-07-31 01:05:34 +00:00
parent 1fc434dc9a
commit 8b04492f2c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118233

View file

@ -260,7 +260,8 @@ cpu_thread_setup(struct thread *td)
{
td->td_pcb =
(struct pcb *)(td->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
(struct pcb *)(td->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
td->td_md.md_pcbpaddr = (void*)vtophys((vm_offset_t)td->td_pcb);
td->td_frame = (struct trapframe *)((caddr_t)td->td_pcb) - 1;
}