Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/arch/arm/arm32 Pull up following revision(s) (request...
details: https://anonhg.NetBSD.org/src/rev/82e9c0824aba
branches: netbsd-9
changeset: 454659:82e9c0824aba
user: martin <martin%NetBSD.org@localhost>
date: Tue Sep 24 02:52:09 2019 +0000
description:
Pull up following revision(s) (requested by jmcneill in ticket #236):
sys/arch/arm/arm32/bus_dma.c: revision 1.116
bus_dmamap_load_raw: support coherent mappings
bus_dmamap_sync: support syncing "raw" buffer types
diffstat:
sys/arch/arm/arm32/bus_dma.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (59 lines):
diff -r 48e6ad0e118f -r 82e9c0824aba sys/arch/arm/arm32/bus_dma.c
--- a/sys/arch/arm/arm32/bus_dma.c Tue Sep 24 02:50:36 2019 +0000
+++ b/sys/arch/arm/arm32/bus_dma.c Tue Sep 24 02:52:09 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.115 2019/06/14 09:09:12 skrll Exp $ */
+/* $NetBSD: bus_dma.c,v 1.115.2.1 2019/09/24 02:52:09 martin Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include "opt_cputypes.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.115 2019/06/14 09:09:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.115.2.1 2019/09/24 02:52:09 martin Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -750,8 +750,10 @@
sgsize = MIN(ds->ds_len, size);
if (sgsize == 0)
continue;
+ const bool coherent =
+ (ds->_ds_flags & _BUS_DMAMAP_COHERENT) != 0;
error = _bus_dmamap_load_paddr(t, map, ds->ds_addr,
- sgsize, false);
+ sgsize, coherent);
if (error != 0)
break;
size -= sgsize;
@@ -766,6 +768,9 @@
/* XXX TBD bounce */
map->dm_mapsize = size0;
+ map->_dm_origbuf = NULL;
+ map->_dm_buftype = _BUS_DMA_BUFTYPE_RAW;
+ map->_dm_vmspace = NULL;
return 0;
}
@@ -1165,6 +1170,7 @@
switch (buftype) {
case _BUS_DMA_BUFTYPE_LINEAR:
+ case _BUS_DMA_BUFTYPE_RAW:
_bus_dmamap_sync_linear(t, map, offset, len, ops);
break;
@@ -1176,10 +1182,6 @@
_bus_dmamap_sync_uio(t, map, offset, len, ops);
break;
- case _BUS_DMA_BUFTYPE_RAW:
- panic("_bus_dmamap_sync: _BUS_DMA_BUFTYPE_RAW");
- break;
-
case _BUS_DMA_BUFTYPE_INVALID:
panic("_bus_dmamap_sync: _BUS_DMA_BUFTYPE_INVALID");
break;
Home |
Main Index |
Thread Index |
Old Index