Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sbus round the space we bus_space_map() up to PAGE_S...
details: https://anonhg.NetBSD.org/src/rev/cbc03bb32c46
branches: trunk
changeset: 751200:cbc03bb32c46
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Jan 27 21:02:22 2010 +0000
description:
round the space we bus_space_map() up to PAGE_SIZE alignment
diffstat:
sys/dev/sbus/agten.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 09c3eb986d35 -r cbc03bb32c46 sys/dev/sbus/agten.c
--- a/sys/dev/sbus/agten.c Wed Jan 27 21:01:33 2010 +0000
+++ b/sys/dev/sbus/agten.c Wed Jan 27 21:02:22 2010 +0000
@@ -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) {
Home |
Main Index |
Thread Index |
Old Index