From 7458aafff0569577b463f9c368e66cb25262aa6c Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 26 Jul 2009 18:48:56 +0000 Subject: Make sure all platforms understand the flags argument of bus_space_map() and bus_space_alloc() as a bitmask of flags, and not a boolean controlling cacheability; and make sure the three MI BUS_SPACE_MAP_xxx values documented in the manual page are defined on all platforms as well. --- sys/dev/pci/tga.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sys/dev/pci/tga.c') diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index f4c70ab097b..881e013eed7 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tga.c,v 1.31 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: tga.c,v 1.32 2009/07/26 18:48:55 miod Exp $ */ /* $NetBSD: tga.c,v 1.40 2002/03/13 15:05:18 ad Exp $ */ /* @@ -219,14 +219,12 @@ tga_getdevconfig(memt, pc, tag, dc) return; DPRINTF("tga_getdevconfig: preparing to map\n"); -#ifdef __OpenBSD__ - if (bus_space_map(memt, dc->dc_pcipaddr, pcisize, 1, &dc->dc_memh)) - return; - dc->dc_vaddr = dc->dc_memh; -#else if (bus_space_map(memt, dc->dc_pcipaddr, pcisize, BUS_SPACE_MAP_PREFETCHABLE | BUS_SPACE_MAP_LINEAR, &dc->dc_memh)) return; +#ifdef __OpenBSD__ + dc->dc_vaddr = dc->dc_memh; +#else dc->dc_vaddr = (vaddr_t) bus_space_vaddr(memt, dc->dc_memh); #endif DPRINTF("tga_getdevconfig: mapped\n"); -- cgit v1.2.3