Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/include/sys Make dma_tag_t a bit more useful.



details:   https://anonhg.NetBSD.org/src/rev/8cc584b6c290
branches:  trunk
changeset: 790161:8cc584b6c290
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Sep 22 20:51:18 2013 +0000

description:
Make dma_tag_t a bit more useful.

XXX: this header should definitely not exist, but given that it does,
let's use it to make life easier.  The implication of its existence is
that x86 port rump kernel components are not ABI-compatible with kernel
modules which use bus_space/bus_dma.  I'm not sure if anyone is interested
in that...

diffstat:

 sys/rump/include/sys/bus.h |  23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diffs (51 lines):

diff -r 5122ac4d4a8a -r 8cc584b6c290 sys/rump/include/sys/bus.h
--- a/sys/rump/include/sys/bus.h        Sun Sep 22 18:56:11 2013 +0000
+++ b/sys/rump/include/sys/bus.h        Sun Sep 22 20:51:18 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.1 2011/07/15 23:40:56 dyoung Exp $   */
+/*     $NetBSD: bus.h,v 1.2 2013/09/22 20:51:18 pooka Exp $    */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -29,20 +29,19 @@
 #define _SYS_RUMP_BUS_H_
 
 /*
- * This is a blanket header for archs which are inline/macro-happy
- * in their bus.h header.  Currently, this is anything but x86.
- * After an arch is cured from inline scurvy, the native bus.h
- * should be used.
+ * This is a blanket header since archs are inline/macro-happy.
+ *
+ * XXX: this file should NOT exist here
  */
 
 /* bus space defs */
-typedef int bus_addr_t;
-typedef int bus_size_t;
+typedef unsigned long bus_addr_t;
+typedef unsigned long bus_size_t;
 typedef int bus_space_tag_t;
 typedef int bus_space_handle_t;
 
 /* bus dma defs */
-typedef int *bus_dma_tag_t;
+typedef void *bus_dma_tag_t;
 
 typedef struct {
        bus_addr_t ds_addr;
@@ -50,6 +49,14 @@
 } bus_dma_segment_t;
 
 typedef struct {
+       bus_size_t _dm_size;
+       int _dm_segcnt;
+       bus_size_t _dm_maxmaxsegsz;
+       bus_size_t _dm_boundary;
+       bus_addr_t _dm_bounce_thresh;
+       int _dm_flags;
+       void *_dm_cookie;
+
        bus_size_t dm_maxsegsz;
        bus_size_t dm_mapsize;
        int dm_nsegs;



Home | Main Index | Thread Index | Old Index