Skip to content

Commit

Permalink
Merge OpenBSD -current.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsutre committed Feb 8, 2013
1 parent 82e5988 commit dc12047
Show file tree
Hide file tree
Showing 101 changed files with 7,362 additions and 2,009 deletions.
11 changes: 6 additions & 5 deletions openbsd/src/sys/arch/amd64/amd64/bus_dma.c
@@ -1,4 +1,4 @@
/* $OpenBSD: bus_dma.c,v 1.38 2011/07/03 18:31:02 oga Exp $ */
/* $OpenBSD: bus_dma.c,v 1.40 2012/12/08 12:04:21 mpi Exp $ */
/* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */

/*-
Expand Down Expand Up @@ -31,8 +31,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <sys/cdefs.h>

/*
* The following is included because _bus_dma_uiomove is derived from
* uiomove() in kern_subr.c.
Expand Down Expand Up @@ -535,7 +533,10 @@ paddr_t
_bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
int prot, int flags)
{
int i;
int i, pmapflags = 0;

if (flags & BUS_DMA_NOCACHE)
pmapflags |= PMAP_NOCACHE;

for (i = 0; i < nsegs; i++) {
#ifdef DIAGNOSTIC
Expand All @@ -552,7 +553,7 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}

return (segs[i].ds_addr + off);
return ((segs[i].ds_addr + off) | pmapflags);
}

/* Page not found. */
Expand Down

0 comments on commit dc12047

Please sign in to comment.