Module Name:    src
Committed By:   matt
Date:           Sun Jan 10 03:08:35 UTC 2010

Modified Files:
        src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_obio.c

Log Message:
Actually use a 32bit limit for the 32bit bus_dma_tag.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/arch/mips/rmi/rmixl_obio.c

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/mips/rmi/rmixl_obio.c
diff -u src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.9 src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.10
--- src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.9	Sun Jan 10 02:48:47 2010
+++ src/sys/arch/mips/rmi/rmixl_obio.c	Sun Jan 10 03:08:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_obio.c,v 1.1.2.9 2010/01/10 02:48:47 matt Exp $	*/
+/*	$NetBSD: rmixl_obio.c,v 1.1.2.10 2010/01/10 03:08:35 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.1.2.9 2010/01/10 02:48:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.1.2.10 2010/01/10 03:08:35 matt Exp $");
 
 #include "locators.h"
 #include "obio.h"
@@ -180,11 +180,10 @@
 	if (rcp->rc_64bit_dmat._cookie == 0)
 		obio_dma_init_64(&rcp->rc_64bit_dmat);
 
-	/* dma space for addr < 512MB */
+	/* dma space for addr < 4GB */
 	if (rcp->rc_32bit_dmat == NULL) {
 		error = bus_dmatag_subregion(&rcp->rc_64bit_dmat,
-		    0, MIPS_KSEG1_START - MIPS_KSEG0_START,
-		    &rcp->rc_32bit_dmat, 0);
+		    0, (bus_addr_t)1 << 32, &rcp->rc_32bit_dmat, 0);
 		if (error)
 			panic("%s: failed to create 32bit dma tag: %d",
 			    __func__, error);
@@ -193,8 +192,7 @@
 	/* dma space for addr < 512MB */
 	if (rcp->rc_29bit_dmat == NULL) {
 		error = bus_dmatag_subregion(rcp->rc_32bit_dmat,
-		    0, MIPS_KSEG1_START - MIPS_KSEG0_START,
-		    &rcp->rc_29bit_dmat, 0);
+		    0, (bus_addr_t)1 << 29, &rcp->rc_29bit_dmat, 0);
 		if (error)
 			panic("%s: failed to create 29bit dma tag: %d",
 			    __func__, error);

Reply via email to