Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Change the way to implement zero copy dat...
details: https://anonhg.NetBSD.org/src/rev/827fa777e7d6
branches: trunk
changeset: 484986:827fa777e7d6
user: nisimura <nisimura%NetBSD.org@localhost>
date: Sun Apr 16 09:09:42 2000 +0000
description:
Change the way to implement zero copy data move in pagemove() using
MIPS_TBRPL(). It saves about 20 instructions to run for each
iteration, and avoids TLB polution. Currently works for MIPS1 only
configuration.
diffstat:
sys/arch/mips/mips/vm_machdep.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 49126590666d -r 827fa777e7d6 sys/arch/mips/mips/vm_machdep.c
--- a/sys/arch/mips/mips/vm_machdep.c Sun Apr 16 09:00:26 2000 +0000
+++ b/sys/arch/mips/mips/vm_machdep.c Sun Apr 16 09:09:42 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.54 2000/04/12 01:37:58 nisimura Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.55 2000/04/16 09:09:42 nisimura Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.54 2000/04/12 01:37:58 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.55 2000/04/16 09:09:42 nisimura Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -294,11 +294,17 @@
#endif
invalid = (CPUISMIPS3) ? MIPS3_PG_NV | MIPS3_PG_G : MIPS1_PG_NV;
while (size > 0) {
+ tpte->pt_entry = fpte->pt_entry;
+ fpte->pt_entry = invalid;
+#if defined(MIPS1) && !defined(MIPS3)
+ {
+ extern void mips1_TBRPL(vaddr_t, vaddr_t, p_addr_t);
+ mips1_TBRPL((vaddr_t)from, (vaddr_t)to, tpte->pt_entry);
+ }
+#else
MIPS_TBIS((vaddr_t)from);
- MachTLBUpdate((vaddr_t)to, fpte->pt_entry); /* ??? */
- *tpte = *fpte;
- fpte->pt_entry = invalid;
-
+ MachTLBUpdate((vaddr_t)to, tpte->pt_entry);
+#endif
fpte++; tpte++;
size -= PAGE_SIZE;
from += PAGE_SIZE;
Home |
Main Index |
Thread Index |
Old Index