summaryrefslogtreecommitdiff
path: root/sys/dev/ic/siop.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2004-10-13 23:33:04 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2004-10-13 23:33:04 +0000
commit6a9f9e3a6dd8f8de50733740c28445b4c0dd15cf (patch)
treee83b1ef4337aa75584d21d5d64e93ed23fd9d9b0 /sys/dev/ic/siop.c
parent51d6f4f08020a82d2332e882adad51ca775ed4f5 (diff)
De-inline siop. Shrinks almost 1K on i386.
ok deraadt@, marco@, weingart@, millert@.
Diffstat (limited to 'sys/dev/ic/siop.c')
-rw-r--r--sys/dev/ic/siop.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index 3564a604090..dd20b6f9329 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.36 2004/07/31 10:27:14 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.37 2004/10/13 23:33:02 krw Exp $ */
/* $NetBSD: siop.c,v 1.65 2002/11/08 22:04:41 bouyer Exp $ */
/*
@@ -74,6 +74,10 @@
/* Number of scheduler slot (needs to match script) */
#define SIOP_NSLOTS 40
+void siop_table_sync(struct siop_cmd *, int);
+void siop_script_sync(struct siop_softc *, int);
+u_int32_t siop_script_read(struct siop_softc *, u_int);
+void siop_script_write(struct siop_softc *, u_int, u_int32_t);
void siop_reset(struct siop_softc *);
void siop_handle_reset(struct siop_softc *);
int siop_handle_qtag_reject(struct siop_cmd *);
@@ -121,8 +125,21 @@ void siop_printstats(void);
#define INCSTAT(x)
#endif
-static __inline__ void siop_script_sync(struct siop_softc *, int);
-static __inline__ void
+void
+siop_table_sync(siop_cmd, ops)
+ struct siop_cmd *siop_cmd;
+ int ops;
+{
+ struct siop_common_softc *sc = siop_cmd->cmd_c.siop_sc;
+ bus_addr_t offset;
+
+ offset = siop_cmd->cmd_c.dsa -
+ siop_cmd->siop_cbdp->xferdma->dm_segs[0].ds_addr;
+ bus_dmamap_sync(sc->sc_dmat, siop_cmd->siop_cbdp->xferdma, offset,
+ sizeof(struct siop_xfer), ops);
+}
+
+void
siop_script_sync(sc, ops)
struct siop_softc *sc;
int ops;
@@ -132,8 +149,7 @@ siop_script_sync(sc, ops)
PAGE_SIZE, ops);
}
-static __inline__ u_int32_t siop_script_read(struct siop_softc *, u_int);
-static __inline__ u_int32_t
+u_int32_t
siop_script_read(sc, offset)
struct siop_softc *sc;
u_int offset;
@@ -146,9 +162,7 @@ siop_script_read(sc, offset)
}
}
-static __inline__ void siop_script_write(struct siop_softc *, u_int,
- u_int32_t);
-static __inline__ void
+void
siop_script_write(sc, offset, val)
struct siop_softc *sc;
u_int offset;