Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/landisk/landisk return allocated va.
details: https://anonhg.NetBSD.org/src/rev/4d7704657e9b
branches: trunk
changeset: 753428:4d7704657e9b
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sun Mar 28 07:31:59 2010 +0000
description:
return allocated va.
diffstat:
sys/arch/landisk/landisk/bus_dma.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r 09dff652a483 -r 4d7704657e9b sys/arch/landisk/landisk/bus_dma.c
--- a/sys/arch/landisk/landisk/bus_dma.c Sun Mar 28 05:24:00 2010 +0000
+++ b/sys/arch/landisk/landisk/bus_dma.c Sun Mar 28 07:31:59 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.11 2010/03/21 14:49:28 nonaka Exp $ */
+/* $NetBSD: bus_dma.c,v 1.12 2010/03/28 07:31:59 nonaka Exp $ */
/*
* Copyright (c) 2005 NONAKA Kimihiro
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.11 2010/03/21 14:49:28 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.12 2010/03/28 07:31:59 nonaka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -664,7 +664,7 @@
_bus_dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
size_t size, void **kvap, int flags)
{
- vaddr_t va;
+ vaddr_t va, topva;
bus_addr_t addr;
int curseg;
@@ -695,6 +695,7 @@
| ((flags & BUS_DMA_NOWAIT) ? UVM_KMF_NOWAIT : 0));
if (va == 0)
return (ENOMEM);
+ topva = va;
for (curseg = 0; curseg < nsegs; curseg++) {
DPRINTF(("%s: segs[%d]: ds_addr = 0x%08lx, ds_len = %ld\n",
@@ -714,7 +715,7 @@
}
pmap_update(pmap_kernel());
- *kvap = (void *)va;
+ *kvap = (void *)topva;
return (0);
}
Home |
Main Index |
Thread Index |
Old Index