setredzone() has been #if 0 since it's inception[0] into tree some 13
years ago. Can it be removed?

[0]: 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/amd64/amd64/vm_machdep.c?rev=1.1&content-type=text/x-cvsweb-markup


diff --git a/sys/arch/amd64/amd64/vm_machdep.c 
b/sys/arch/amd64/amd64/vm_machdep.c
index 2b402e5ec74..7a6e05c63aa 100644
--- a/sys/arch/amd64/amd64/vm_machdep.c
+++ b/sys/arch/amd64/amd64/vm_machdep.c
@@ -60,8 +60,6 @@
 #include <machine/fpu.h>
 #include <machine/tcb.h>
 
-void setredzone(struct proc *);
-
 /*
  * Finish a fork operation, with process p2 nearly set up.
  * Copy and update the kernel stack and pcb, making the child
@@ -109,8 +107,6 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, 
size_t stacksize,
        p2->p_md.md_regs = tf = (struct trapframe *)pcb->pcb_kstack - 1;
        *tf = *p1->p_md.md_regs;
 
-       setredzone(p2);
-
        /*
         * If specified, give the child a different stack.
         */
@@ -144,19 +140,6 @@ cpu_exit(struct proc *p)
 }
 
 /*
- * Set a red zone in the kernel stack after the u. area.
- */
-void
-setredzone(struct proc *p)
-{
-#if 0
-       pmap_remove(pmap_kernel(), (vaddr_t)p->p_addr + PAGE_SIZE,
-           (vaddr_t)p->p_addr + 2 * PAGE_SIZE);
-       pmap_update(pmap_kernel());
-#endif
-}
-
-/*
  * Map a user I/O request into kernel virtual address space.
  * Note: the pages are already locked by uvm_vslock(), so we
  * do not need to pass an access_type to pmap_enter().   


-- 
Ossi Herrala

Reply via email to