diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-05-12 20:48:20 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-05-12 20:48:20 +0000 |
commit | 14386d7e3174d157ac5bf93f4ae751d8c0517992 (patch) | |
tree | e6cd66e29b287d3c4eb1f58f05058fb87fa50668 /sys/arch/alpha/include/bus.h | |
parent | 3a1a208b741df59910fb9e108226cba78f3ee915 (diff) |
Keep track of which DMA window was actually used to map the
request (not always the passed in DMA tag if we try direct-map
and then fall back to sgmap-mapped). Use the actual window
when performing dmamap_sync and dmamap_unload operations.
From NetBSD
ok martin@
Diffstat (limited to 'sys/arch/alpha/include/bus.h')
-rw-r--r-- | sys/arch/alpha/include/bus.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h index e42d3037850..adb8c1421fc 100644 --- a/sys/arch/alpha/include/bus.h +++ b/sys/arch/alpha/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.23 2006/04/27 15:17:07 mickey Exp $ */ +/* $OpenBSD: bus.h,v 1.24 2006/05/12 20:48:19 brad Exp $ */ /* $NetBSD: bus.h,v 1.10 1996/12/02 22:19:32 cgd Exp $ */ /* @@ -594,9 +594,11 @@ struct alpha_bus_dma_tag { #define bus_dmamap_load_raw(t, m, sg, n, s, f) \ (*(t)->_dmamap_load_raw)((t), (m), (sg), (n), (s), (f)) #define bus_dmamap_unload(t, p) \ - (*(t)->_dmamap_unload)((t), (p)) + (void)(t), \ + (*(p)->_dm_window->_dmamap_unload)((p)->_dm_window, (p)) #define bus_dmamap_sync(t, p, a, s, op) \ - (*(t)->_dmamap_sync)((t), (p), (a), (s), (op)) + (void)(t), \ + (*(p)->_dm_window->_dmamap_sync)((p)->_dm_window, (p), (a), (s), (op)) #define bus_dmamem_alloc(t, s, a, b, sg, n, r, f) \ (*(t)->_dmamem_alloc)((t), (s), (a), (b), (sg), (n), (r), (f)) #define bus_dmamem_free(t, sg, n) \ @@ -629,6 +631,11 @@ struct alpha_bus_dmamap { void *_dm_cookie; /* + * The DMA window that we ended up being mapped in. + */ + bus_dma_tag_t _dm_window; + + /* * PUBLIC MEMBERS: these are used by machine-independent code. */ bus_size_t dm_mapsize; /* size of the mapping */ |