Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 pmap_zero_page, pmap_copy_page, pmap_page...
details: https://anonhg.NetBSD.org/src/rev/b87f7dc4915d
branches: trunk
changeset: 570420:b87f7dc4915d
user: yamt <yamt%NetBSD.org@localhost>
date: Sun Oct 10 09:53:23 2004 +0000
description:
pmap_zero_page, pmap_copy_page, pmap_pageidlezero:
preset PG_M and PG_U where appropriate to eliminate pte writebacks.
from freebsd.
diffstat:
sys/arch/i386/i386/pmap.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r 2ace1ed6050e -r b87f7dc4915d sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Sun Oct 10 09:52:29 2004 +0000
+++ b/sys/arch/i386/i386/pmap.c Sun Oct 10 09:53:23 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.175 2004/10/10 09:52:29 yamt Exp $ */
+/* $NetBSD: pmap.c,v 1.176 2004/10/10 09:53:23 yamt Exp $ */
/*
*
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.175 2004/10/10 09:52:29 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.176 2004/10/10 09:53:23 yamt Exp $");
#include "opt_cputype.h"
#include "opt_user_ldt.h"
@@ -2273,7 +2273,7 @@
panic("pmap_zero_page: lock botch");
#endif
- *zpte = (pa & PG_FRAME) | PG_V | PG_RW; /* map in */
+ *zpte = (pa & PG_FRAME) | PG_V | PG_RW | PG_M | PG_U; /* map in */
pmap_update_pg((vaddr_t)zerova); /* flush TLB */
memset(zerova, 0, PAGE_SIZE); /* zero */
@@ -2304,7 +2304,7 @@
if (*zpte)
panic("pmap_zero_page_uncached: lock botch");
#endif
- *zpte = (pa & PG_FRAME) | PG_V | PG_RW; /* map in */
+ *zpte = (pa & PG_FRAME) | PG_V | PG_RW | PG_M | PG_U; /* map in */
pmap_update_pg((vaddr_t)zerova); /* flush TLB */
for (i = 0, ptr = (int *) zerova; i < PAGE_SIZE / sizeof(int); i++) {
if (sched_whichqs != 0) {
@@ -2349,8 +2349,8 @@
panic("pmap_copy_page: lock botch");
#endif
- *spte = (srcpa & PG_FRAME) | PG_V | PG_RW;
- *dpte = (dstpa & PG_FRAME) | PG_V | PG_RW;
+ *spte = (srcpa & PG_FRAME) | PG_V | PG_RW | PG_U;
+ *dpte = (dstpa & PG_FRAME) | PG_V | PG_RW | PG_M | PG_U;
pmap_update_2pg((vaddr_t)csrcva, (vaddr_t)cdstva);
memcpy(cdstva, csrcva, PAGE_SIZE);
#ifdef DIAGNOSTIC
Home |
Main Index |
Thread Index |
Old Index