Module Name: src
Committed By: tsutsui
Date: Fri Apr 10 13:40:38 UTC 2009
Modified Files:
src/sys/arch/vax/vax: subr.S
Log Message:
Apply patch from mhitch@:
Make copyin(9) and copyout(9) work with 64KB or larger data blocks.
Fixes broken pipe(2) problem mentioned in PR port-vax/41139. Ok'ed by ra...@.
Should be pulled up to netbsd-5.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/vax/vax/subr.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/vax/vax/subr.S
diff -u src/sys/arch/vax/vax/subr.S:1.25 src/sys/arch/vax/vax/subr.S:1.26
--- src/sys/arch/vax/vax/subr.S:1.25 Fri Aug 29 18:25:02 2008
+++ src/sys/arch/vax/vax/subr.S Fri Apr 10 13:40:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: subr.S,v 1.25 2008/08/29 18:25:02 matt Exp $ */
+/* $NetBSD: subr.S,v 1.26 2009/04/10 13:40:38 tsutsui Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -440,7 +440,7 @@
#
ENTRY(copyout, 0)
- movl 8(%ap),%r2
+ movl 8(%ap),%r3
blss 3f # kernel space
movl 4(%ap),%r1
brb 2f
@@ -448,13 +448,18 @@
ENTRY(copyin, 0)
movl 4(%ap),%r1
blss 3f # kernel space
- movl 8(%ap),%r2
-2: mfpr $PR_ESP,%r3
- movab 1f,(%r3)
- movc3 12(%ap),(%r1),(%r2)
-1: mfpr $PR_ESP,%r3
- clrl (%r3)
+ movl 8(%ap),%r3
+2: mfpr $PR_ESP,%r2
+ movab 1f,(%r2)
+4: tstw 14(%ap) # check if >= 64K
+ bneq 5f
+ movc3 12(%ap),(%r1),(%r3)
+1: mfpr $PR_ESP,%r2
+ clrl (%r2)
ret
+5: movc3 $0xfffc,(%r1),(%r3)
+ subl2 $0xfffc,12(%ap)
+ brb 4b
3: mnegl $1,%r0
ret