summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-04-25 23:48:20 +0000
committerdg <dg@FreeBSD.org>1994-04-25 23:48:20 +0000
commitbac3b7fca5322738bda4ead89c3871c594baeda7 (patch)
treeb1cb994ebbc27667fbb9c38fb1c7c83799ca3436 /sys/amd64
parent92d62265a95af2d261c74876dd628adf139f16e3 (diff)
downloadFreeBSD-src-bac3b7fca5322738bda4ead89c3871c594baeda7.zip
FreeBSD-src-bac3b7fca5322738bda4ead89c3871c594baeda7.tar.gz
From John Dyson:
Fixed physio in the 386 case - write faults weren't properly implemented.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/vm_machdep.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 89eb127..a892c29 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $Id: vm_machdep.c,v 1.19 1994/04/14 07:49:40 davidg Exp $
+ * $Id: vm_machdep.c,v 1.20 1994/04/20 07:06:20 davidg Exp $
*/
#include "npx.h"
@@ -594,14 +594,12 @@ cldisksort(struct buf *dp, struct buf *bp, vm_offset_t maxio)
insert:
-#if 0
/*
* read clustering with new read-ahead disk drives hurts mostly, so
* we don't bother...
*/
if( bp->b_flags & B_READ)
goto nocluster;
-#endif
/*
* we currently only cluster I/O transfers that are at page-aligned
* kvas and transfers that are multiples of page lengths.
@@ -830,6 +828,25 @@ nocluster:
bp->av_back = ap;
}
+/*
+ * quick version of vm_fault
+ */
+
+void
+vm_fault_quick( v, prot)
+ vm_offset_t v;
+ int prot;
+{
+ if( (cpu_class == CPUCLASS_386) &&
+ (prot & VM_PROT_WRITE))
+ vm_fault(&curproc->p_vmspace->vm_map, v,
+ VM_PROT_READ|VM_PROT_WRITE, FALSE);
+ else if( prot & VM_PROT_WRITE)
+ *(volatile char *)v += 0;
+ else
+ *(volatile char *)v;
+}
+
/*
* Finish a fork operation, with process p2 nearly set up.
OpenPOWER on IntegriCloud