Subject: Re: NEW_PIPE problems with -current on sparc
To: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
From: Chuck Silvers <chuq@chuq.com>
List: port-sparc
Date: 12/22/2001 18:43:12
--SUOF0GtieIMvvwua
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
hi,
I've tracked this down to a problem with the pmap code.
either of the attached two patches make the problem go away on my IPX,
which indicates that there's some problem with the cache manipulation
in pmap_kremove4_4c(), but I don't see what's wrong with the code.
any other sparc folks see what's wrong here?
-Chuck
On Tue, Nov 27, 2001 at 09:27:24PM +0100, Markus W Kilbinger wrote:
> Hi!
>
> After recent announcement of switching to NEW_PIPE on sparc
> architecture (and some other platforms) I tried this option with a
> complete -current system on my IPX. Result:
>
> A simple 'tar xvzf base.tgz' yields a lot of 'Skipping to next file
> header...' (== fails).
>
> Removing the NEW_PIPE option from my kernel config and rebuilding the
> kernel not changed otherwise solves this problem. -> Seems to be a
> sparc specific NEW_PIPE problem (I don't see it on i386, powerpc,
> alpha).
>
> How/whom to report it?
>
> Markus.
--SUOF0GtieIMvvwua
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="diff.sparc-workaround.1"
Index: kern/sys_pipe.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/sys_pipe.c,v
retrieving revision 1.21
diff -u -r1.21 sys_pipe.c
--- kern/sys_pipe.c 2001/12/18 08:49:40 1.21
+++ kern/sys_pipe.c 2001/12/23 02:40:55
@@ -1071,7 +1071,7 @@
/* Enter the loaned pages to kva */
kva = wpipe->pipe_map.kva;
for (j = 0; j < npages; j++, kva += PAGE_SIZE) {
- pmap_kenter_pa(kva, VM_PAGE_TO_PHYS(pgs[j]), VM_PROT_READ);
+ pmap_kenter_pa(kva, VM_PAGE_TO_PHYS(pgs[j]) | 4, VM_PROT_READ);
}
pmap_update(pmap_kernel());
--SUOF0GtieIMvvwua
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="diff.sparc-workaround.2"
Index: kern/sys_pipe.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/sys_pipe.c,v
retrieving revision 1.21
diff -u -r1.21 sys_pipe.c
--- kern/sys_pipe.c 2001/12/18 08:49:40 1.21
+++ kern/sys_pipe.c 2001/12/23 02:42:08
@@ -1071,7 +1071,8 @@
/* Enter the loaned pages to kva */
kva = wpipe->pipe_map.kva;
for (j = 0; j < npages; j++, kva += PAGE_SIZE) {
- pmap_kenter_pa(kva, VM_PAGE_TO_PHYS(pgs[j]), VM_PROT_READ);
+ pmap_enter(pmap_kernel(), kva, VM_PAGE_TO_PHYS(pgs[j]),
+ VM_PROT_READ, VM_PROT_READ);
}
pmap_update(pmap_kernel());
@@ -1095,7 +1096,8 @@
cleanup:
pipelock(wpipe, 0);
if (pgs != NULL) {
- pmap_kremove(wpipe->pipe_map.kva, blen);
+ pmap_remove(pmap_kernel(), wpipe->pipe_map.kva,
+ wpipe->pipe_map.kva + blen);
uvm_unloan(pgs, npages, UVM_LOAN_TOPAGE);
}
if (error || amountpipekva > maxpipekva)
--SUOF0GtieIMvvwua--