Module Name:    src
Committed By:   macallan
Date:           Wed Jan 27 21:02:22 UTC 2010

Modified Files:
        src/sys/dev/sbus: agten.c

Log Message:
round the space we bus_space_map() up to PAGE_SIZE alignment


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/sbus/agten.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/dev/sbus/agten.c
diff -u src/sys/dev/sbus/agten.c:1.22 src/sys/dev/sbus/agten.c:1.23
--- src/sys/dev/sbus/agten.c:1.22	Thu Sep 17 16:39:48 2009
+++ src/sys/dev/sbus/agten.c	Wed Jan 27 21:02:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: agten.c,v 1.22 2009/09/17 16:39:48 tsutsui Exp $ */
+/*	$NetBSD: agten.c,v 1.23 2010/01/27 21:02:22 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.22 2009/09/17 16:39:48 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.23 2010/01/27 21:02:22 macallan Exp $");
 
 /*
  * a driver for the Fujitsu AG-10e SBus framebuffer
@@ -74,6 +74,8 @@
 #include <dev/ic/i128reg.h>
 #include <dev/ic/i128var.h>
 
+#include <machine/vmparam.h>
+
 #include "opt_agten.h"
 #include "ioconf.h"
 
@@ -246,7 +248,7 @@
 	sc->sc_i128_fbsz = prom_getpropint(node, "i128_fb_size", -1);
 	if (sbus_bus_map(sc->sc_bustag,
 	    sa->sa_reg[0].oa_space, sa->sa_reg[0].oa_base + reg,
-	    sc->sc_stride * sc->sc_height,
+	    (sc->sc_stride * sc->sc_height + PAGE_MASK) & ~PAGE_MASK,
 	    BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_LARGE, 
 	    &sc->sc_i128_fbh) != 0) {
 

Reply via email to