[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Fri Mar 2 15:38:49 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/d5de417085bc
changeset: 376:d5de417085bc
user:      ray at terran.dlink.ua
date:      Fri Mar 02 17:06:28 2012 +0200
description:
Update to FreeBSD-HEAD @232391

diffstat:

 head/sys/arm/arm/busdma_machdep.c        |  12 ++++++------
 head/sys/arm/mv/mv_machdep.c             |  18 ++++++++++++++----
 head/sys/arm/xscale/i8134x/crb_machdep.c |   6 +++---
 3 files changed, 23 insertions(+), 13 deletions(-)

diffs (104 lines):

diff -r dd61890e0bbc -r d5de417085bc head/sys/arm/arm/busdma_machdep.c
--- a/head/sys/arm/arm/busdma_machdep.c	Fri Mar 02 17:06:04 2012 +0200
+++ b/head/sys/arm/arm/busdma_machdep.c	Fri Mar 02 17:06:28 2012 +0200
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/busdma_machdep.c 227309 2011-11-07 15:43:11Z ed $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/busdma_machdep.c 232356 2012-03-01 19:58:34Z jhb $");
 
 /*
  * ARM bus dma support routines
@@ -68,7 +68,7 @@
 struct bus_dma_tag {
 	bus_dma_tag_t		parent;
 	bus_size_t		alignment;
-	bus_size_t		boundary;
+	bus_addr_t		boundary;
 	bus_addr_t		lowaddr;
 	bus_addr_t		highaddr;
 	bus_dma_filter_t	*filter;
@@ -332,7 +332,7 @@
 
 int
 bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
-		   bus_size_t boundary, bus_addr_t lowaddr,
+		   bus_addr_t boundary, bus_addr_t lowaddr,
 		   bus_addr_t highaddr, bus_dma_filter_t *filter,
 		   void *filterarg, bus_size_t maxsize, int nsegments,
 		   bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
@@ -378,12 +378,12 @@
 	 * Take into account any restrictions imposed by our parent tag
 	 */
         if (parent != NULL) {
-                newtag->lowaddr = min(parent->lowaddr, newtag->lowaddr);
-                newtag->highaddr = max(parent->highaddr, newtag->highaddr);
+                newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr);
+                newtag->highaddr = MAX(parent->highaddr, newtag->highaddr);
 		if (newtag->boundary == 0)
 			newtag->boundary = parent->boundary;
 		else if (parent->boundary != 0)
-                	newtag->boundary = min(parent->boundary,
+                	newtag->boundary = MIN(parent->boundary,
 					       newtag->boundary);
 		if ((newtag->filter != NULL) ||
 		    ((parent->flags & BUS_DMA_COULD_BOUNCE) != 0))
diff -r dd61890e0bbc -r d5de417085bc head/sys/arm/mv/mv_machdep.c
--- a/head/sys/arm/mv/mv_machdep.c	Fri Mar 02 17:06:04 2012 +0200
+++ b/head/sys/arm/mv/mv_machdep.c	Fri Mar 02 17:06:28 2012 +0200
@@ -39,7 +39,7 @@
 #include "opt_platform.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/mv/mv_machdep.c 228201 2011-12-02 15:24:39Z jchandra $");
+__FBSDID("$FreeBSD: head/sys/arm/mv/mv_machdep.c 232295 2012-02-29 12:44:34Z cognet $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -287,9 +287,19 @@
 		    availmem_regions[i].mr_start + availmem_regions[i].mr_size,
 		    availmem_regions[i].mr_size);
 
-		phys_avail[j] = availmem_regions[i].mr_start;
-		phys_avail[j + 1] = availmem_regions[i].mr_start +
-		    availmem_regions[i].mr_size;
+		/* 
+		 * We should not map the page at PA 0x0000000, the VM can't
+		 * handle it, as pmap_extract() == 0 means failure.
+		 */
+		if (availmem_regions[i].mr_start > 0 ||
+		    availmem_regions[i].mr_size > PAGE_SIZE) {
+			phys_avail[j] = availmem_regions[i].mr_start;
+			if (phys_avail[j] == 0)
+				phys_avail[j] += PAGE_SIZE;
+			phys_avail[j + 1] = availmem_regions[i].mr_start +
+			    availmem_regions[i].mr_size;
+		} else
+			j -= 2;
 	}
 	phys_avail[j] = 0;
 	phys_avail[j + 1] = 0;
diff -r dd61890e0bbc -r d5de417085bc head/sys/arm/xscale/i8134x/crb_machdep.c
--- a/head/sys/arm/xscale/i8134x/crb_machdep.c	Fri Mar 02 17:06:04 2012 +0200
+++ b/head/sys/arm/xscale/i8134x/crb_machdep.c	Fri Mar 02 17:06:28 2012 +0200
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/crb_machdep.c 220836 2011-04-19 15:05:12Z pluknet $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/crb_machdep.c 232295 2012-02-29 12:44:34Z cognet $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -381,8 +381,8 @@
 	
 	i = 0;
 #ifdef ARM_USE_SMALL_ALLOC
-	phys_avail[i++] = 0x00000000;
-	phys_avail[i++] = 0x00001000; 	/*
+	phys_avail[i++] = 0x00001000;
+	phys_avail[i++] = 0x00002000; 	/*
 					 *XXX: Gross hack to get our
 					 * pages in the vm_page_array
 					 . */


More information about the Zrouter-src-freebsd mailing list