Backed out changes to vm_fault done by SEF w/NetBSD as they don't solve
authorDavid Greenman <davidg@Root.COM>
Mon, 12 Jul 1993 16:13:59 +0000 (16:13 +0000)
committerDavid Greenman <davidg@Root.COM>
Mon, 12 Jul 1993 16:13:59 +0000 (16:13 +0000)
the problem they were supposed to and their 'correctness' is in question.
Also, removed a NetBSD fix (apparently from Yuval Yarom) to vm_mmap that
conflicts with a much better patch from Guido van Ruuij.

sys/vm/vm_fault.c
sys/vm/vm_mmap.c

index a59988f..b521aed 100644 (file)
@@ -62,7 +62,7 @@
  * rights to redistribute these changes.
  */
 
  * rights to redistribute these changes.
  */
 
-static char rcsid[] = "$Header: /home/cvs/386BSD/src/sys.386bsd/vm/vm_fault.c,v 1.1.1.1 93/06/12 14:57:40 rgrimes Exp $";
+static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys.386bsd/vm/vm_fault.c,v 1.2 1993/06/15 15:07:46 nate Exp $";
 
 /*
  *     Page fault handling module.
 
 /*
  *     Page fault handling module.
@@ -246,7 +246,6 @@ vm_fault(map, vaddr, fault_type, change_wiring)
 
                                PAGE_ASSERT_WAIT(m, !change_wiring);
                                UNLOCK_THINGS;
 
                                PAGE_ASSERT_WAIT(m, !change_wiring);
                                UNLOCK_THINGS;
-thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */
                                thread_block();
                                wait_result = current_thread()->wait_result;
                                vm_object_deallocate(first_object);
                                thread_block();
                                wait_result = current_thread()->wait_result;
                                vm_object_deallocate(first_object);
@@ -280,7 +279,6 @@ thread_wakeup(&vm_pages_needed); /* XXX! */
 
                                PAGE_ASSERT_WAIT(m, !change_wiring);
                                UNLOCK_THINGS;
 
                                PAGE_ASSERT_WAIT(m, !change_wiring);
                                UNLOCK_THINGS;
-thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */
                                thread_block();
                                wait_result = current_thread()->wait_result;
                                vm_object_deallocate(first_object);
                                thread_block();
                                wait_result = current_thread()->wait_result;
                                vm_object_deallocate(first_object);
@@ -530,7 +528,7 @@ thread_wakeup(&vm_pages_needed); /* XXX */
                         */
 
                        vm_page_lock_queues();
                         */
 
                        vm_page_lock_queues();
-                       vm_page_activate(m);
+                       vm_page_deactivate(m);
                        pmap_page_protect(VM_PAGE_TO_PHYS(m), VM_PROT_NONE);
                        vm_page_unlock_queues();
 
                        pmap_page_protect(VM_PAGE_TO_PHYS(m), VM_PROT_NONE);
                        vm_page_unlock_queues();
 
@@ -627,7 +625,6 @@ thread_wakeup(&vm_pages_needed); /* XXX */
                                        copy_object->ref_count--;
                                        vm_object_unlock(copy_object);
                                        UNLOCK_THINGS;
                                        copy_object->ref_count--;
                                        vm_object_unlock(copy_object);
                                        UNLOCK_THINGS;
-thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */
                                        thread_block();
                                        wait_result = current_thread()->wait_result;
                                        vm_object_deallocate(first_object);
                                        thread_block();
                                        wait_result = current_thread()->wait_result;
                                        vm_object_deallocate(first_object);
index 78b0c1b..089ffb3 100644 (file)
@@ -198,8 +198,6 @@ smmap(p, uap, retval)
                    ((flags & MAP_SHARED) &&
                     (uap->prot & PROT_WRITE) && (fp->f_flag & FWRITE) == 0))
                        return(EACCES);
                    ((flags & MAP_SHARED) &&
                     (uap->prot & PROT_WRITE) && (fp->f_flag & FWRITE) == 0))
                        return(EACCES);
-               if ((flags & MAP_SHARED) && (fp->f_flag & FWRITE) == 0)
-                       flags = (flags & ~MAP_SHARED) | MAP_PRIVATE;
                handle = (caddr_t)vp;
        } else if (uap->fd != -1)
                handle = (caddr_t)fp;
                handle = (caddr_t)vp;
        } else if (uap->fd != -1)
                handle = (caddr_t)fp;