Subject: more closely scoped source changes for the 'hanging' mount problem
To: None <port-alpha@netbsd.org>
From: Matthew Jacob <mjacob@feral.com>
List: port-alpha
Date: 04/07/1999 17:52:01
(another in a list of deletable messages about this particular issue)

I started with a working CVS tree tagged as

	D99.03.26.20.00.00

(that's 'March 26 1999 20:00 GMT') which does not hang for me and a tree
tagged as

	D99.03.27.04.00.00

(that's 'March 27 1999 04:00 GMT') which hangs coming up for me.

I progressively eliminated all differences by back copying from the later
tree into the earlier tree and ended up with working kernels until only
the following diffs remained- they all relate to pmap/uvm changes. It may
be possible to locate the differences more closely.

Here are the  list of files:

src/sys/arch/alpha/alpha/machdep.c
src/sys/arch/alpha/alpha/pmap.c
src/sys/arch/alpha/alpha/vm_machdep.c
src/sys/arch/alpha/common/bus_dma.c
src/sys/uvm/uvm_device.c
src/sys/uvm/uvm_fault.c
src/sys/uvm/uvm_glue.c
src/sys/uvm/uvm_km.c
src/sys/uvm/uvm_page.c
src/sys/uvm/uvm_pager.c
src/sys/vm/pmap.h

And below is the list of absolute diffs.

-matt

diff --recursive --exclude compile --exclude CVS src/sys/arch/alpha/alpha/machdep.c src.99.03.27.04.00.00/sys/arch/alpha/alpha/machdep.c
1c1
< /* $NetBSD: machdep.c,v 1.164 1999/03/26 00:15:04 thorpej Exp $ */
---
> /* $NetBSD: machdep.c,v 1.165 1999/03/26 23:41:25 mycroft Exp $ */
85c85
< __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.164 1999/03/26 00:15:04 thorpej Exp $");
---
> __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.165 1999/03/26 23:41:25 mycroft Exp $");
1067c1067,1068
< 				   VM_PAGE_TO_PHYS(pg), VM_PROT_ALL, TRUE);
---
> 			    VM_PAGE_TO_PHYS(pg), VM_PROT_READ|VM_PROT_WRITE,
> 			    TRUE, VM_PROT_READ|VM_PROT_WRITE);
diff --recursive --exclude compile --exclude CVS src/sys/arch/alpha/alpha/pmap.c src.99.03.27.04.00.00/sys/arch/alpha/alpha/pmap.c
1c1
< /* $NetBSD: pmap.c,v 1.85 1999/03/26 00:15:04 thorpej Exp $ */
---
> /* $NetBSD: pmap.c,v 1.87 1999/03/27 02:48:32 thorpej Exp $ */
158c158
< __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.85 1999/03/26 00:15:04 thorpej Exp $");
---
> __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.87 1999/03/27 02:48:32 thorpej Exp $");
1563c1563
< pmap_enter(pmap, va, pa, prot, wired)
---
> pmap_enter(pmap, va, pa, prot, wired, access_type)
1568a1569
> 	vm_prot_t access_type;
1773a1775,1788
> 
> 		/*
> 		 * An obvious question here is why a page would be entered in
> 		 * response to a fault, but with permissions less than those
> 		 * requested.  This can happen in the case of a copy-on-write
> 		 * page that's not currently mapped being accessed; the first
> 		 * fault will map the original page read-only, and another
> 		 * fault will be taken to do the copy and make it read-write.
> 		 */
> 		access_type &= prot;
> 		if (access_type & VM_PROT_WRITE)
> 			pvh->pvh_attrs |= (PGA_REFERENCED|PGA_MODIFIED);
> 		else if (access_type & VM_PROT_ALL)
> 			pvh->pvh_attrs |= PGA_REFERENCED;
diff --recursive --exclude compile --exclude CVS src/sys/arch/alpha/alpha/vm_machdep.c src.99.03.27.04.00.00/sys/arch/alpha/alpha/vm_machdep.c
1c1
< /* $NetBSD: vm_machdep.c,v 1.44 1999/03/24 05:50:51 mrg Exp $ */
---
> /* $NetBSD: vm_machdep.c,v 1.45 1999/03/26 23:41:26 mycroft Exp $ */
32c32
< __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.44 1999/03/24 05:50:51 mrg Exp $");
---
> __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.45 1999/03/26 23:41:26 mycroft Exp $");
405c405
< 		    VM_PROT_READ|VM_PROT_WRITE, TRUE);
---
> 		    VM_PROT_READ|VM_PROT_WRITE, TRUE, 0);
diff --recursive --exclude compile --exclude CVS src/sys/arch/alpha/common/bus_dma.c src.99.03.27.04.00.00/sys/arch/alpha/common/bus_dma.c
1c1
< /* $NetBSD: bus_dma.c,v 1.28 1999/03/24 05:50:52 mrg Exp $ */
---
> /* $NetBSD: bus_dma.c,v 1.29 1999/03/26 23:41:27 mycroft Exp $ */
44c44
< __KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.28 1999/03/24 05:50:52 mrg Exp $");
---
> __KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.29 1999/03/26 23:41:27 mycroft Exp $");
591c591
< 			    VM_PROT_READ | VM_PROT_WRITE, TRUE);
---
> 			    VM_PROT_READ | VM_PROT_WRITE, TRUE, 0);
Only in src/sys/arch: pmax
Only in src.99.03.27.04.00.00/sys/lkm: arch
diff --recursive --exclude compile --exclude CVS src/sys/uvm/uvm_device.c src.99.03.27.04.00.00/sys/uvm/uvm_device.c
1c1
< /*	$NetBSD: uvm_device.c,v 1.14 1999/03/25 18:48:50 mrg Exp $	*/
---
> /*	$NetBSD: uvm_device.c,v 1.15 1999/03/26 21:58:39 mycroft Exp $	*/
479c479,480
< 		pmap_enter(ufi->orig_map->pmap, curr_va, paddr, access_type, 0);
---
> 		pmap_enter(ufi->orig_map->pmap, curr_va, paddr, access_type, 0,
> 		    access_type);
diff --recursive --exclude compile --exclude CVS src/sys/uvm/uvm_fault.c src.99.03.27.04.00.00/sys/uvm/uvm_fault.c
1c1
< /*	$NetBSD: uvm_fault.c,v 1.22 1999/03/26 17:34:16 chs Exp $	*/
---
> /*	$NetBSD: uvm_fault.c,v 1.23 1999/03/26 21:58:39 mycroft Exp $	*/
651c651
< 			enter_prot = enter_prot & ~VM_PROT_WRITE; 
---
> 			enter_prot &= ~VM_PROT_WRITE; 
822c822
< 			    (ufi.entry->wired_count != 0));
---
> 			    (ufi.entry->wired_count != 0), 0);
950c950,951
< 				    VM_PROT_READ : enter_prot, wired);
---
> 				    VM_PROT_READ : enter_prot, wired,
> 				    access_type);
1205c1206
< 	    enter_prot, wired);
---
> 	    enter_prot, wired, access_type);
1633c1634
< 	    enter_prot, wired);
---
> 	    enter_prot, wired, access_type);
diff --recursive --exclude compile --exclude CVS src/sys/uvm/uvm_glue.c src.99.03.27.04.00.00/sys/uvm/uvm_glue.c
1c1
< /*	$NetBSD: uvm_glue.c,v 1.17 1999/03/25 18:48:51 mrg Exp $	*/
---
> /*	$NetBSD: uvm_glue.c,v 1.18 1999/03/26 21:58:39 mycroft Exp $	*/
214c214
< 		pmap_enter(pmap_kernel(), sva, pa&~1, prot, TRUE);
---
> 		pmap_enter(pmap_kernel(), sva, pa&~1, prot, TRUE, 0);
diff --recursive --exclude compile --exclude CVS src/sys/uvm/uvm_km.c src.99.03.27.04.00.00/sys/uvm/uvm_km.c
1c1
< /*	$NetBSD: uvm_km.c,v 1.21 1999/03/26 17:34:16 chs Exp $	*/
---
> /*	$NetBSD: uvm_km.c,v 1.22 1999/03/26 21:58:39 mycroft Exp $	*/
735c735
< 		    UVM_PROT_ALL, TRUE);
---
> 		    UVM_PROT_ALL, TRUE, 0);
868c868
< 		    UVM_PROT_ALL, TRUE);
---
> 		    UVM_PROT_ALL, TRUE, 0);
diff --recursive --exclude compile --exclude CVS src/sys/uvm/uvm_page.c src.99.03.27.04.00.00/sys/uvm/uvm_page.c
1c1
< /*	$NetBSD: uvm_page.c,v 1.16 1999/03/25 18:48:53 mrg Exp $	*/
---
> /*	$NetBSD: uvm_page.c,v 1.17 1999/03/26 21:58:39 mycroft Exp $	*/
429c429,430
< 		    VM_PROT_READ|VM_PROT_WRITE, FALSE);
---
> 		    VM_PROT_READ|VM_PROT_WRITE, FALSE,
> 		    VM_PROT_READ|VM_PROT_WRITE);
diff --recursive --exclude compile --exclude CVS src/sys/uvm/uvm_pager.c src.99.03.27.04.00.00/sys/uvm/uvm_pager.c
1c1
< /*	$NetBSD: uvm_pager.c,v 1.15 1999/03/25 18:48:55 mrg Exp $	*/
---
> /*	$NetBSD: uvm_pager.c,v 1.16 1999/03/26 21:58:39 mycroft Exp $	*/
188c188
< 		    VM_PROT_DEFAULT, TRUE);
---
> 		    VM_PROT_DEFAULT, TRUE, 0);
diff --recursive --exclude compile --exclude CVS src/sys/vm/pmap.h src.99.03.27.04.00.00/sys/vm/pmap.h
1c1
< /*	$NetBSD: pmap.h,v 1.28 1999/01/16 20:00:28 chuck Exp $	*/
---
> /*	$NetBSD: pmap.h,v 1.29 1999/03/26 21:58:39 mycroft Exp $	*/
146c146
< 		    vaddr_t, paddr_t, vm_prot_t, boolean_t));
---
> 		    vaddr_t, paddr_t, vm_prot_t, boolean_t, vm_prot_t));