From 6bbfd3e9ff2f41f79aaee758749c4da3dacba425 Mon Sep 17 00:00:00 2001 From: thorpej Date: Tue, 17 Mar 1998 04:59:36 +0000 Subject: [PATCH] Use pmap_kenter_pa() in _bus_dmamem_map() if PMAP_NEW. --- sys/arch/alpha/common/bus_dma.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/arch/alpha/common/bus_dma.c b/sys/arch/alpha/common/bus_dma.c index 474e8c17d8d8..936337eb7c1e 100644 --- a/sys/arch/alpha/common/bus_dma.c +++ b/sys/arch/alpha/common/bus_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.16 1998/02/24 07:38:03 thorpej Exp $ */ +/* $NetBSD: bus_dma.c,v 1.17 1998/03/17 04:59:36 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -38,10 +38,11 @@ */ #include "opt_uvm.h" +#include "opt_pmap_new.h" #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.16 1998/02/24 07:38:03 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.17 1998/03/17 04:59:36 thorpej Exp $"); #include #include @@ -517,8 +518,12 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags) addr += NBPG, va += NBPG, size -= NBPG) { if (size == 0) panic("_bus_dmamem_map: size botch"); +#if defined(PMAP_NEW) + pmap_kenter_pa(va, addr, VM_PROT_READ | VM_PROT_WRITE); +#else pmap_enter(pmap_kernel(), va, addr, VM_PROT_READ | VM_PROT_WRITE, TRUE); +#endif } }