We might not ever do this, but at the moment as we go into bigmem dma handling
it is nice if we trigger bugs earlier rather than later.

This triggers some bugs, some of which are easy to fix.  Run it please if you
can and report problems in details.

Index: kern_fork.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_fork.c,v
retrieving revision 1.125
diff -u -p -u -r1.125 kern_fork.c
--- kern_fork.c 3 Apr 2011 14:56:28 -0000       1.125
+++ kern_fork.c 5 Apr 2011 23:05:26 -0000
@@ -253,7 +253,7 @@ fork1(struct proc *p1, int exitsig, int 
 
        uaddr = uvm_km_kmemalloc_pla(kernel_map, uvm.kernel_object, USPACE,
            USPACE_ALIGN, UVM_KMF_ZERO,
-           dma_constraint.ucr_low, dma_constraint.ucr_high,
+           no_constraint.ucr_low, no_constraint.ucr_high,
            0, 0, USPACE/PAGE_SIZE);
        if (uaddr == 0) {
                chgproccnt(uid, -1);
Index: kern_malloc.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_malloc.c,v
retrieving revision 1.86
diff -u -p -u -r1.86 kern_malloc.c
--- kern_malloc.c       26 Sep 2010 21:03:56 -0000      1.86
+++ kern_malloc.c       5 Apr 2011 23:05:20 -0000
@@ -244,7 +244,7 @@ malloc(unsigned long size, int type, int
                    (vsize_t)ptoa(npg), 0,
                    ((flags & M_NOWAIT) ? UVM_KMF_NOWAIT : 0) |
                    ((flags & M_CANFAIL) ? UVM_KMF_CANFAIL : 0),
-                   dma_constraint.ucr_low, dma_constraint.ucr_high,
+                   no_constraint.ucr_low, no_constraint.ucr_high,
                    0, 0, 0);
                if (va == NULL) {
                        /*

Reply via email to