summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-05-27 04:59:59 +0000
committerscottl <scottl@FreeBSD.org>2003-05-27 04:59:59 +0000
commitf26aca7b718b2d8b17889ad8eb0c65281493cc06 (patch)
treeaaea1de6e07eae55f5e31e6ae4f5d42cc5ae59a1
parent5fd5bdfb84667ef474531ecc19cceafdf2ef5e36 (diff)
downloadFreeBSD-src-f26aca7b718b2d8b17889ad8eb0c65281493cc06.zip
FreeBSD-src-f26aca7b718b2d8b17889ad8eb0c65281493cc06.tar.gz
Bring back bus_dmasync_op_t. It is now a typedef to an int, though the
BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah)
-rw-r--r--sys/alpha/alpha/busdma_machdep.c2
-rw-r--r--sys/alpha/include/bus.h3
-rw-r--r--sys/amd64/amd64/busdma_machdep.c2
-rw-r--r--sys/amd64/include/bus_dma.h3
-rw-r--r--sys/dev/advansys/advansys.c4
-rw-r--r--sys/dev/advansys/adwcam.c4
-rw-r--r--sys/dev/aha/aha.c4
-rw-r--r--sys/dev/ahb/ahb.c4
-rw-r--r--sys/dev/aic7xxx/aic79xx_osm.c4
-rw-r--r--sys/dev/aic7xxx/aic7xxx_osm.c4
-rw-r--r--sys/dev/amd/amd.c4
-rw-r--r--sys/dev/buslogic/bt.c4
-rw-r--r--sys/dev/dpt/dpt_scsi.c4
-rw-r--r--sys/dev/ida/ida.c6
-rw-r--r--sys/dev/mpt/mpt_freebsd.c6
-rw-r--r--sys/dev/trm/trm.c2
-rw-r--r--sys/i386/i386/busdma_machdep.c2
-rw-r--r--sys/i386/include/bus_dma.h3
-rw-r--r--sys/ia64/ia64/busdma_machdep.c2
-rw-r--r--sys/ia64/include/bus.h3
-rw-r--r--sys/powerpc/include/bus.h3
-rw-r--r--sys/powerpc/powerpc/busdma_machdep.c2
-rw-r--r--sys/sparc64/include/bus.h6
-rw-r--r--sys/sparc64/pci/psycho.c5
-rw-r--r--sys/sparc64/sbus/sbus.c5
-rw-r--r--sys/sparc64/sparc64/bus_machdep.c5
-rw-r--r--sys/sparc64/sparc64/iommu.c2
-rw-r--r--sys/sys/bus_dma.h3
28 files changed, 56 insertions, 45 deletions
diff --git a/sys/alpha/alpha/busdma_machdep.c b/sys/alpha/alpha/busdma_machdep.c
index 57c0dd8..c52e071 100644
--- a/sys/alpha/alpha/busdma_machdep.c
+++ b/sys/alpha/alpha/busdma_machdep.c
@@ -769,7 +769,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
}
void
-_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int op)
+_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
{
struct bounce_page *bpage;
diff --git a/sys/alpha/include/bus.h b/sys/alpha/include/bus.h
index 852648d..2d44ddf 100644
--- a/sys/alpha/include/bus.h
+++ b/sys/alpha/include/bus.h
@@ -482,6 +482,7 @@ struct uio;
/*
* Operations performed by bus_dmamap_sync().
*/
+typedef int bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
@@ -615,7 +616,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
/*
* Perform a syncronization operation on the given map.
*/
-void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
+void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
#define bus_dmamap_sync(dmat, dmamap, op) \
if ((dmamap) != NULL) \
_bus_dmamap_sync(dmat, dmamap, op)
diff --git a/sys/amd64/amd64/busdma_machdep.c b/sys/amd64/amd64/busdma_machdep.c
index 47b8c42..e2cd2d4 100644
--- a/sys/amd64/amd64/busdma_machdep.c
+++ b/sys/amd64/amd64/busdma_machdep.c
@@ -702,7 +702,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
}
void
-_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int op)
+_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
{
struct bounce_page *bpage;
diff --git a/sys/amd64/include/bus_dma.h b/sys/amd64/include/bus_dma.h
index 67609d9..a74a942 100644
--- a/sys/amd64/include/bus_dma.h
+++ b/sys/amd64/include/bus_dma.h
@@ -91,6 +91,7 @@ struct uio;
/*
* Operations performed by bus_dmamap_sync().
*/
+typedef int bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
@@ -224,7 +225,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
/*
* Perform a syncronization operation on the given map.
*/
-void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
+void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
#define bus_dmamap_sync(dmat, dmamap, op) \
if ((dmamap) != NULL) \
_bus_dmamap_sync(dmat, dmamap, op)
diff --git a/sys/dev/advansys/advansys.c b/sys/dev/advansys/advansys.c
index ad12847..ed820aa 100644
--- a/sys/dev/advansys/advansys.c
+++ b/sys/dev/advansys/advansys.c
@@ -568,7 +568,7 @@ adv_execute_ccb(void *arg, bus_dma_segment_t *dm_segs,
scsiq.q2.vm_id = 0;
if (nsegments != 0) {
- int op;
+ bus_dmasync_op_t op;
scsiq.q1.data_addr = dm_segs->ds_addr;
scsiq.q1.data_cnt = dm_segs->ds_len;
@@ -1130,7 +1130,7 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat,
LIST_REMOVE(&ccb->ccb_h, sim_links.le);
untimeout(adv_timeout, ccb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
diff --git a/sys/dev/advansys/adwcam.c b/sys/dev/advansys/adwcam.c
index ac80286..4085f3b 100644
--- a/sys/dev/advansys/adwcam.c
+++ b/sys/dev/advansys/adwcam.c
@@ -255,7 +255,7 @@ adwexecuteacb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
}
if (nseg != 0) {
- int op;
+ bus_dmasync_op_t op;
acb->queue.data_addr = dm_segs[0].ds_addr;
acb->queue.data_cnt = ccb->csio.dxfer_len;
@@ -1334,7 +1334,7 @@ adw_intr(void *arg)
ccb = acb->ccb;
untimeout(adwtimeout, acb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c
index 75cff34..7fe6f25 100644
--- a/sys/dev/aha/aha.c
+++ b/sys/dev/aha/aha.c
@@ -1115,7 +1115,7 @@ ahaexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
aha_sg_t *sg;
bus_dma_segment_t *end_seg;
- int op;
+ bus_dmasync_op_t op;
end_seg = dm_segs + nseg;
@@ -1254,7 +1254,7 @@ ahadone(struct aha_softc *aha, struct aha_ccb *accb, aha_mbi_comp_code_t comp_co
}
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c
index a60097f..e6d715b 100644
--- a/sys/dev/ahb/ahb.c
+++ b/sys/dev/ahb/ahb.c
@@ -788,7 +788,7 @@ ahbdone(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
LIST_REMOVE(&ccb->ccb_h, sim_links.le);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
@@ -912,7 +912,7 @@ ahbexecuteecb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
ahb_sg_t *sg;
bus_dma_segment_t *end_seg;
- int op;
+ bus_dmasync_op_t op;
end_seg = dm_segs + nseg;
diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c
index c1650b3..c2bb23b 100644
--- a/sys/dev/aic7xxx/aic79xx_osm.c
+++ b/sys/dev/aic7xxx/aic79xx_osm.c
@@ -215,7 +215,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
untimeout(ahd_timeout, (caddr_t)scb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- /*XXX bus_dmasync_op_t*/int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
@@ -1056,7 +1056,7 @@ ahd_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments,
scb->sg_count = 0;
if (nsegments != 0) {
void *sg;
- /*bus_dmasync_op_t*/int op;
+ bus_dmasync_op_t op;
u_int i;
/* Copy the segments into our SG list */
diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c
index 2cdeb34..91af8dd 100644
--- a/sys/dev/aic7xxx/aic7xxx_osm.c
+++ b/sys/dev/aic7xxx/aic7xxx_osm.c
@@ -284,7 +284,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
untimeout(ahc_timeout, (caddr_t)scb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- /*XXX bus_dmasync_op_t*/int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
@@ -1107,7 +1107,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments,
if (nsegments != 0) {
struct ahc_dma_seg *sg;
bus_dma_segment_t *end_seg;
- /*XXX bus_dmasync_op_t*/int op;
+ bus_dmasync_op_t op;
end_seg = dm_segs + nsegments;
diff --git a/sys/dev/amd/amd.c b/sys/dev/amd/amd.c
index e611acc..ae8b8a8 100644
--- a/sys/dev/amd/amd.c
+++ b/sys/dev/amd/amd.c
@@ -328,7 +328,7 @@ amdexecutesrb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
struct amd_sg *sg;
bus_dma_segment_t *end_seg;
- int op;
+ bus_dmasync_op_t op;
end_seg = dm_segs + nseg;
@@ -1888,7 +1888,7 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB)
("SRBdone - TagNumber %d\n", pSRB->TagNumber));
if ((pccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c
index d7eb213..cfcf2e6 100644
--- a/sys/dev/buslogic/bt.c
+++ b/sys/dev/buslogic/bt.c
@@ -1471,7 +1471,7 @@ btexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
bt_sg_t *sg;
bus_dma_segment_t *end_seg;
- int op;
+ bus_dmasync_op_t op;
end_seg = dm_segs + nseg;
@@ -1608,7 +1608,7 @@ btdone(struct bt_softc *bt, struct bt_ccb *bccb, bt_mbi_comp_code_t comp_code)
}
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c
index 2c75285..33420aa 100644
--- a/sys/dev/dpt/dpt_scsi.c
+++ b/sys/dev/dpt/dpt_scsi.c
@@ -746,7 +746,7 @@ dptexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg != 0) {
dpt_sg_t *sg;
bus_dma_segment_t *end_seg;
- int op;
+ bus_dmasync_op_t op;
end_seg = dm_segs + nseg;
@@ -1695,7 +1695,7 @@ dpt_intr(void *arg)
ccb = dccb->ccb;
untimeout(dpttimeout, dccb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c
index d45e74a..c141749 100644
--- a/sys/dev/ida/ida.c
+++ b/sys/dev/ida/ida.c
@@ -324,7 +324,7 @@ ida_command(struct ida_softc *ida, int command, void *data, int datasize,
{
struct ida_hardware_qcb *hwqcb;
struct ida_qcb *qcb;
- int op;
+ bus_dmasync_op_t op;
int s, error;
s = splbio();
@@ -377,7 +377,7 @@ ida_construct_qcb(struct ida_softc *ida)
{
struct ida_hardware_qcb *hwqcb;
struct ida_qcb *qcb;
- int op;
+ bus_dmasync_op_t op;
struct bio *bp;
bp = bioq_first(&ida->bio_queue);
@@ -501,7 +501,7 @@ ida_done(struct ida_softc *ida, struct ida_qcb *qcb)
* finish up command
*/
if (qcb->flags & DMA_DATA_TRANSFER) {
- int op;
+ bus_dmasync_op_t op;
op = qcb->flags & DMA_DATA_IN ?
BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE;
diff --git a/sys/dev/mpt/mpt_freebsd.c b/sys/dev/mpt/mpt_freebsd.c
index 6361574..926ab3a 100644
--- a/sys/dev/mpt/mpt_freebsd.c
+++ b/sys/dev/mpt/mpt_freebsd.c
@@ -224,7 +224,7 @@ mpt_execute_req(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
if (nseg > MPT_NSGL_FIRST(mpt)) {
int i, nleft = nseg;
u_int32_t flags;
- int op;
+ bus_dmamap_sync_t op;
SGE_CHAIN32 *ce;
mpt_req->DataLength = ccb->csio.dxfer_len;
@@ -305,7 +305,7 @@ mpt_execute_req(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
} else if (nseg > 0) {
int i;
u_int32_t flags;
- int op;
+ bus_dmamap_sync_t op;
mpt_req->DataLength = ccb->csio.dxfer_len;
flags = MPI_SGE_FLAGS_SIMPLE_ELEMENT;
@@ -878,7 +878,7 @@ mpt_done(mpt_softc_t *mpt, u_int32_t reply)
untimeout(mpttimeout, ccb, ccb->ccb_h.timeout_ch);
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmamap_sync_t op;
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
op = BUS_DMASYNC_POSTREAD;
diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c
index 058fcde..3cb9e4f 100644
--- a/sys/dev/trm/trm.c
+++ b/sys/dev/trm/trm.c
@@ -2504,7 +2504,7 @@ trm_SRBdone(PACB pACB, PDCB pDCB, PSRB pSRB)
target_id = pSRB->pccb->ccb_h.target_id;
target_lun = pSRB->pccb->ccb_h.target_lun;
if ((pccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- int op;
+ bus_dmasync_op_t op;
if ((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
op = BUS_DMASYNC_POSTREAD;
else
diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c
index 47b8c42..e2cd2d4 100644
--- a/sys/i386/i386/busdma_machdep.c
+++ b/sys/i386/i386/busdma_machdep.c
@@ -702,7 +702,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
}
void
-_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int op)
+_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
{
struct bounce_page *bpage;
diff --git a/sys/i386/include/bus_dma.h b/sys/i386/include/bus_dma.h
index f706677..2a10d06 100644
--- a/sys/i386/include/bus_dma.h
+++ b/sys/i386/include/bus_dma.h
@@ -91,6 +91,7 @@ struct uio;
/*
* Operations performed by bus_dmamap_sync().
*/
+typedef int bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
@@ -224,7 +225,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
/*
* Perform a syncronization operation on the given map.
*/
-void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
+void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
#define bus_dmamap_sync(dmat, dmamap, op) \
if ((dmamap) != NULL) \
_bus_dmamap_sync(dmat, dmamap, op)
diff --git a/sys/ia64/ia64/busdma_machdep.c b/sys/ia64/ia64/busdma_machdep.c
index 93ec7ba..33cece4 100644
--- a/sys/ia64/ia64/busdma_machdep.c
+++ b/sys/ia64/ia64/busdma_machdep.c
@@ -765,7 +765,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
}
void
-_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int op)
+_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
{
struct bounce_page *bpage;
diff --git a/sys/ia64/include/bus.h b/sys/ia64/include/bus.h
index 5b24029..c060a4b 100644
--- a/sys/ia64/include/bus.h
+++ b/sys/ia64/include/bus.h
@@ -864,6 +864,7 @@ struct uio;
/*
* Operations performed by bus_dmamap_sync().
*/
+typedef int bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
@@ -998,7 +999,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, struct uio *ui,
*/
void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
static __inline void
-bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t dmamap, int op)
+bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t dmamap, bus_dmasync_op_t op)
{
if ((dmamap) != NULL)
_bus_dmamap_sync(dmat, dmamap, op);
diff --git a/sys/powerpc/include/bus.h b/sys/powerpc/include/bus.h
index 153231f..eff6e8f 100644
--- a/sys/powerpc/include/bus.h
+++ b/sys/powerpc/include/bus.h
@@ -756,6 +756,7 @@ struct uio;
/*
* Operations performed by bus_dmamap_sync().
*/
+typedef int bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
@@ -888,7 +889,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
/*
* Perform a syncronization operation on the given map.
*/
-void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
+void bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
/*
* Release the mapping held by map.
diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c
index 81ec2a9..34c737f 100644
--- a/sys/powerpc/powerpc/busdma_machdep.c
+++ b/sys/powerpc/powerpc/busdma_machdep.c
@@ -521,7 +521,7 @@ bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
}
void
-bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int op)
+bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
{
return;
diff --git a/sys/sparc64/include/bus.h b/sys/sparc64/include/bus.h
index c69c270..39a048c 100644
--- a/sys/sparc64/include/bus.h
+++ b/sys/sparc64/include/bus.h
@@ -905,6 +905,7 @@ memsetw(void *d, int val, size_t size)
struct mbuf;
struct uio;
+typedef int bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
@@ -975,7 +976,7 @@ struct bus_dma_tag {
bus_dmamap_t, struct uio *, bus_dmamap_callback2_t *, void *, int);
void (*dt_dmamap_unload)(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t);
void (*dt_dmamap_sync)(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
- int);
+ bus_dmasync_op_t);
/*
* DMA memory utility functions.
@@ -1080,7 +1081,8 @@ sparc64_dmamap_unload(bus_dma_tag_t pt, bus_dma_tag_t dt, bus_dmamap_t p)
sparc64_dmamap_unload((t), (t), (p))
static __inline void
-sparc64_dmamap_sync(bus_dma_tag_t pt, bus_dma_tag_t dt, bus_dmamap_t m, int op)
+sparc64_dmamap_sync(bus_dma_tag_t pt, bus_dma_tag_t dt, bus_dmamap_t m,
+ bus_dmasync_op_t op)
{
bus_dma_tag_t lt;
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 5de26ba..4cd7fef 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -111,7 +111,8 @@ static int psycho_dmamap_load_mbuf(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
static int psycho_dmamap_load_uio(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
struct uio *, bus_dmamap_callback2_t *, void *, int);
static void psycho_dmamap_unload(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t);
-static void psycho_dmamap_sync(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t, int);
+static void psycho_dmamap_sync(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
+ bus_dmasync_op_t);
static int psycho_dmamem_alloc(bus_dma_tag_t, bus_dma_tag_t, void **, int,
bus_dmamap_t *);
static void psycho_dmamem_free(bus_dma_tag_t, bus_dma_tag_t, void *,
@@ -1402,7 +1403,7 @@ psycho_dmamap_unload(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, bus_dmamap_t map)
static void
psycho_dmamap_sync(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, bus_dmamap_t map,
- int op)
+ bus_dmasync_op_t op)
{
struct psycho_softc *sc;
diff --git a/sys/sparc64/sbus/sbus.c b/sys/sparc64/sbus/sbus.c
index 8debb26..dfd8708 100644
--- a/sys/sparc64/sbus/sbus.c
+++ b/sys/sparc64/sbus/sbus.c
@@ -242,7 +242,8 @@ static int sbus_dmamap_load_mbuf(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
static int sbus_dmamap_load_uio(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
struct uio *, bus_dmamap_callback2_t *, void *, int);
static void sbus_dmamap_unload(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t);
-static void sbus_dmamap_sync(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t, int);
+static void sbus_dmamap_sync(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
+ bus_dmasync_op_t);
static int sbus_dmamem_alloc(bus_dma_tag_t, bus_dma_tag_t, void **, int,
bus_dmamap_t *);
static void sbus_dmamem_free(bus_dma_tag_t, bus_dma_tag_t, void *,
@@ -979,7 +980,7 @@ sbus_dmamap_unload(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, bus_dmamap_t map)
static void
sbus_dmamap_sync(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, bus_dmamap_t map,
- int op)
+ bus_dmasync_op_t op)
{
struct sbus_softc *sc = (struct sbus_softc *)pdmat->dt_cookie;
diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c
index e4eea40..d8e46ed 100644
--- a/sys/sparc64/sparc64/bus_machdep.c
+++ b/sys/sparc64/sparc64/bus_machdep.c
@@ -169,7 +169,8 @@ static int nexus_dmamap_load_mbuf(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
static int nexus_dmamap_load_uio(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
struct uio *, bus_dmamap_callback2_t *, void *, int);
static void nexus_dmamap_unload(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t);
-static void nexus_dmamap_sync(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t, int);
+static void nexus_dmamap_sync(bus_dma_tag_t, bus_dma_tag_t, bus_dmamap_t,
+ bus_dmasync_op_t);
static int nexus_dmamem_alloc(bus_dma_tag_t, bus_dma_tag_t, void **, int,
bus_dmamap_t *);
static void nexus_dmamem_free(bus_dma_tag_t, bus_dma_tag_t, void *,
@@ -548,7 +549,7 @@ nexus_dmamap_unload(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, bus_dmamap_t map)
*/
static void
nexus_dmamap_sync(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, bus_dmamap_t map,
- int op)
+ bus_dmasync_op_t op)
{
/*
diff --git a/sys/sparc64/sparc64/iommu.c b/sys/sparc64/sparc64/iommu.c
index fc4c0a8..a18a987 100644
--- a/sys/sparc64/sparc64/iommu.c
+++ b/sys/sparc64/sparc64/iommu.c
@@ -992,7 +992,7 @@ iommu_dvmamap_unload(bus_dma_tag_t pt, bus_dma_tag_t dt, struct iommu_state *is,
void
iommu_dvmamap_sync(bus_dma_tag_t pt, bus_dma_tag_t dt, struct iommu_state *is,
- bus_dmamap_t map, int op)
+ bus_dmamap_t map, bus_dmasync_op_t op)
{
struct bus_dmamap_res *r;
vm_offset_t va;
diff --git a/sys/sys/bus_dma.h b/sys/sys/bus_dma.h
index f706677..2a10d06 100644
--- a/sys/sys/bus_dma.h
+++ b/sys/sys/bus_dma.h
@@ -91,6 +91,7 @@ struct uio;
/*
* Operations performed by bus_dmamap_sync().
*/
+typedef int bus_dmasync_op_t;
#define BUS_DMASYNC_PREREAD 1
#define BUS_DMASYNC_POSTREAD 2
#define BUS_DMASYNC_PREWRITE 4
@@ -224,7 +225,7 @@ int bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
/*
* Perform a syncronization operation on the given map.
*/
-void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int);
+void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
#define bus_dmamap_sync(dmat, dmamap, op) \
if ((dmamap) != NULL) \
_bus_dmamap_sync(dmat, dmamap, op)
OpenPOWER on IntegriCloud