Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/hp300 In pmap_enter(), set the appropriate pa...



details:   https://anonhg.NetBSD.org/src/rev/41e75fd65896
branches:  trunk
changeset: 467827:41e75fd65896
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Mar 30 00:12:32 1999 +0000

description:
In pmap_enter(), set the appropriate page attributes based on access_type.
The m68k maintains modified and referenced information for us, but seeding
the page attributes can save us a pv list traversal.

diffstat:

 sys/arch/hp300/hp300/pmap.c |  16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r 0817177e3b57 -r 41e75fd65896 sys/arch/hp300/hp300/pmap.c
--- a/sys/arch/hp300/hp300/pmap.c       Tue Mar 30 00:12:14 1999 +0000
+++ b/sys/arch/hp300/hp300/pmap.c       Tue Mar 30 00:12:32 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.70 1999/03/27 05:57:03 mycroft Exp $        */
+/*     $NetBSD: pmap.c,v 1.71 1999/03/30 00:12:32 thorpej Exp $        */
 
 /* 
  * Copyright (c) 1991, 1993
@@ -1299,6 +1299,20 @@
                        }
 #endif
                }
+
+               /*
+                * Speed pmap_is_referenced() or pmap_is_modified() based
+                * on the hint provided in access_type.
+                */
+#ifdef DIAGNOSTIC
+               if (access_type & ~prot)
+                       panic("pmap_enter: access_type exceeds prot");
+#endif
+               if (access_type & VM_PROT_WRITE)
+                       *pa_to_attribute(pa) |= (PG_U|PG_M);
+               else if (access_type & VM_PROT_ALL)
+                       *pa_to_attribute(pa) |= PG_U;
+
                splx(s);
        }
        /*



Home | Main Index | Thread Index | Old Index