Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sun3 remove a useless call to uvm_map_protect(). t...



details:   https://anonhg.NetBSD.org/src/rev/f1baae06a5cf
branches:  trunk
changeset: 510426:f1baae06a5cf
user:      chs <chs%NetBSD.org@localhost>
date:      Mon May 28 21:54:26 2001 +0000

description:
remove a useless call to uvm_map_protect().  the kernel text is already
mapped read-only in pmap_bootstrap() and the comment which tried to
explain why this might be needed anyway didn't make any sense.

diffstat:

 sys/arch/sun3/sun3/machdep.c  |  11 +----------
 sys/arch/sun3/sun3x/machdep.c |  11 +----------
 2 files changed, 2 insertions(+), 20 deletions(-)

diffs (50 lines):

diff -r 81ca81e08658 -r f1baae06a5cf sys/arch/sun3/sun3/machdep.c
--- a/sys/arch/sun3/sun3/machdep.c      Mon May 28 21:06:18 2001 +0000
+++ b/sys/arch/sun3/sun3/machdep.c      Mon May 28 21:54:26 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.145 2001/04/24 04:31:13 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.146 2001/05/28 21:54:26 chs Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -292,15 +292,6 @@
        printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
 
        /*
-        * Tell the VM system that writing to kernel text isn't allowed.
-        * If we don't, we might end up COW'ing the text segment!
-        */
-       if (uvm_map_protect(kernel_map, (vm_offset_t) kernel_text,
-           m68k_trunc_page((vm_offset_t) etext),
-           UVM_PROT_READ|UVM_PROT_EXEC, TRUE) != 0)
-               panic("can't protect kernel text");
-
-       /*
         * Allocate a virtual page (for use by /dev/mem)
         * This page is handed to pmap_enter() therefore
         * it has to be in the normal kernel VA range.
diff -r 81ca81e08658 -r f1baae06a5cf sys/arch/sun3/sun3x/machdep.c
--- a/sys/arch/sun3/sun3x/machdep.c     Mon May 28 21:06:18 2001 +0000
+++ b/sys/arch/sun3/sun3x/machdep.c     Mon May 28 21:54:26 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.66 2001/05/28 20:56:54 chs Exp $ */
+/*     $NetBSD: machdep.c,v 1.67 2001/05/28 21:54:27 chs Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -294,15 +294,6 @@
        printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
 
        /*
-        * Tell the VM system that writing to kernel text isn't allowed.
-        * If we don't, we might end up COW'ing the text segment!
-        */
-       if (uvm_map_protect(kernel_map, (vm_offset_t) kernel_text,
-           m68k_trunc_page((vm_offset_t) etext),
-           UVM_PROT_READ|UVM_PROT_EXEC, TRUE) != 0)
-               panic("can't protect kernel text");
-
-       /*
         * Allocate a virtual page (for use by /dev/mem)
         * This page is handed to pmap_enter() therefore
         * it has to be in the normal kernel VA range.



Home | Main Index | Thread Index | Old Index