diff options
-rw-r--r-- | sys/arch/hp300/hp300/bus_space.c | 11 | ||||
-rw-r--r-- | sys/dev/ic/sti.c | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/sys/arch/hp300/hp300/bus_space.c b/sys/arch/hp300/hp300/bus_space.c index 6d6d69b6bab..34225a6f11c 100644 --- a/sys/arch/hp300/hp300/bus_space.c +++ b/sys/arch/hp300/hp300/bus_space.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_space.c,v 1.1 2005/01/14 22:39:27 miod Exp $ */ +/* $OpenBSD: bus_space.c,v 1.2 2005/01/23 16:55:17 miod Exp $ */ /* $NetBSD: bus_space.c,v 1.6 2002/09/27 15:36:02 provos Exp $ */ /*- @@ -69,6 +69,7 @@ bus_space_map(t, bpa, size, flags, bshp) { u_long kva; int error; + pt_entry_t ptemask; switch (HP300_TAG_BUS(t)) { case HP300_BUS_INTIO: @@ -101,9 +102,13 @@ bus_space_map(t, bpa, size, flags, bshp) return (error); /* - * Map the range. The range is always cache-inhibited on the hp300. + * Map the range. */ - physaccess((caddr_t)kva, (caddr_t)bpa, size, PG_RW | PG_CI); + if (flags & BUS_SPACE_MAP_CACHEABLE) + ptemask = PG_RW; + else + ptemask = PG_RW | PG_CI; + physaccess((caddr_t)kva, (caddr_t)bpa, size, ptemask); /* * All done. diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index f46ba58b8a2..59495e8a184 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sti.c,v 1.39 2005/01/23 16:53:21 miod Exp $ */ +/* $OpenBSD: sti.c,v 1.40 2005/01/23 16:55:18 miod Exp $ */ /* * Copyright (c) 2000-2003 Michael Shalayeff @@ -309,7 +309,9 @@ sti_attach_common(sc, codebase) /* rom has already been mapped */ if (p != cc->regions) { if (bus_space_map(sc->memt, *p, - r.length << PGSHIFT, 0, &fbh)) { + r.length << PGSHIFT, + r.cache ? BUS_SPACE_MAP_CACHEABLE : 0, + &fbh)) { #ifdef STIDEBUG printf("already mapped region\n"); #endif |