diff options
author | neel <neel@FreeBSD.org> | 2010-04-14 01:29:31 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2010-04-14 01:29:31 +0000 |
commit | 88551608b7559691f1e7c3045de5412f73a74a23 (patch) | |
tree | be607a2f904cd64970b9db2f99fdaf5f3d9cd8cf | |
parent | 007384b17e557a3e565d71b91f76a8ac36cfc4d2 (diff) | |
download | FreeBSD-src-88551608b7559691f1e7c3045de5412f73a74a23.zip FreeBSD-src-88551608b7559691f1e7c3045de5412f73a74a23.tar.gz |
Revert the vm_machdep.c part of r205072.
This causes a panic in vm_thread_dispose() when it tries to add this kstack
to the kstack cache. This happens only when 'td_kstack' is not (PAGE_SIZE * 2)
bytes aligned and we have unmapped the page at that address in cpu_thread_alloc.
Pointed out by: nwhitehorn@
-rw-r--r-- | sys/mips/mips/vm_machdep.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c index 3f8e6cc..57219f6 100644 --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -214,16 +214,6 @@ cpu_thread_swapin(struct thread *td) { pt_entry_t *pte; int i; - vm_offset_t unused_kstack_page; - - /* - * Unmap the unused kstack page. - */ - unused_kstack_page = td->td_kstack; - if (td->td_md.md_realstack == td->td_kstack) - unused_kstack_page += (KSTACK_PAGES - 1) * PAGE_SIZE; - - pmap_kremove(unused_kstack_page); /* * The kstack may be at a different physical address now. @@ -249,19 +239,13 @@ cpu_thread_swapout(struct thread *td) void cpu_thread_alloc(struct thread *td) { - vm_offset_t unused_kstack_page; pt_entry_t *pte; int i; - if (td->td_kstack & (1 << PAGE_SHIFT)) { + if (td->td_kstack & (1 << PAGE_SHIFT)) td->td_md.md_realstack = td->td_kstack + PAGE_SIZE; - unused_kstack_page = td->td_kstack; - } else { + else td->td_md.md_realstack = td->td_kstack; - unused_kstack_page = td->td_kstack + - (KSTACK_PAGES - 1) * PAGE_SIZE; - } - pmap_kremove(unused_kstack_page); td->td_pcb = (struct pcb *)(td->td_md.md_realstack + (td->td_kstack_pages - 1) * PAGE_SIZE) - 1; |