summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-03-30 18:12:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-03-30 18:12:25 +0000
commit3076796b221bd6357e3d04cdf61dccc056f8a7c5 (patch)
tree1e0a7f9f8c192107e3f5e49f6770cf8e83a795d6
parent674ee8a796bc56d9215201e9519b8ebb8a1687b8 (diff)
make the code look the same; ok kettenis
-rw-r--r--sys/arch/amd64/amd64/bus_dma.c8
-rw-r--r--sys/arch/i386/i386/bus_dma.c5
2 files changed, 5 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/bus_dma.c b/sys/arch/amd64/amd64/bus_dma.c
index 20d951a08c0..8af1c492adf 100644
--- a/sys/arch/amd64/amd64/bus_dma.c
+++ b/sys/arch/amd64/amd64/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.16 2009/03/10 15:03:16 oga Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.17 2009/03/30 18:12:24 deraadt Exp $ */
/* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
@@ -412,7 +412,7 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
{
vaddr_t va;
bus_addr_t addr;
- int curseg, pmapflags = 0;
+ int curseg, pmapflags = VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED;
if (flags & BUS_DMA_NOCACHE)
pmapflags |= PMAP_NOCACHE;
@@ -431,9 +431,7 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
if (size == 0)
panic("_bus_dmamem_map: size botch");
pmap_enter(pmap_kernel(), va, addr,
- VM_PROT_READ | VM_PROT_WRITE,
- VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED |
- pmapflags);
+ VM_PROT_READ | VM_PROT_WRITE, pmapflags);
}
}
pmap_update(pmap_kernel());
diff --git a/sys/arch/i386/i386/bus_dma.c b/sys/arch/i386/i386/bus_dma.c
index 970830d3e7a..70442e62202 100644
--- a/sys/arch/i386/i386/bus_dma.c
+++ b/sys/arch/i386/i386/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.6 2009/03/30 17:43:15 ratchov Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.7 2009/03/30 18:12:24 deraadt Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -367,9 +367,8 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
{
vaddr_t va;
bus_addr_t addr;
- int curseg, pmapflags;
+ int curseg, pmapflags = VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED;
- pmapflags = VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED;
if (flags & BUS_DMA_NOCACHE)
pmapflags |= PMAP_NOCACHE;