1129198Scognet/*	$NetBSD: bus.h,v 1.11 2003/07/28 17:35:54 thorpej Exp $	*/
2129198Scognet
3129198Scognet/*-
4129198Scognet * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
5129198Scognet * All rights reserved.
6129198Scognet *
7129198Scognet * This code is derived from software contributed to The NetBSD Foundation
8129198Scognet * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9129198Scognet * NASA Ames Research Center.
10129198Scognet *
11129198Scognet * Redistribution and use in source and binary forms, with or without
12129198Scognet * modification, are permitted provided that the following conditions
13129198Scognet * are met:
14129198Scognet * 1. Redistributions of source code must retain the above copyright
15129198Scognet *    notice, this list of conditions and the following disclaimer.
16129198Scognet * 2. Redistributions in binary form must reproduce the above copyright
17129198Scognet *    notice, this list of conditions and the following disclaimer in the
18129198Scognet *    documentation and/or other materials provided with the distribution.
19129198Scognet *
20129198Scognet * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21129198Scognet * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22129198Scognet * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23129198Scognet * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24129198Scognet * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25129198Scognet * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26129198Scognet * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27129198Scognet * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28129198Scognet * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29129198Scognet * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30129198Scognet * POSSIBILITY OF SUCH DAMAGE.
31129198Scognet */
32129198Scognet
33139735Simp/*-
34129198Scognet * Copyright (c) 1996 Charles M. Hannum.  All rights reserved.
35129198Scognet * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
36129198Scognet *
37129198Scognet * Redistribution and use in source and binary forms, with or without
38129198Scognet * modification, are permitted provided that the following conditions
39129198Scognet * are met:
40129198Scognet * 1. Redistributions of source code must retain the above copyright
41129198Scognet *    notice, this list of conditions and the following disclaimer.
42129198Scognet * 2. Redistributions in binary form must reproduce the above copyright
43129198Scognet *    notice, this list of conditions and the following disclaimer in the
44129198Scognet *    documentation and/or other materials provided with the distribution.
45129198Scognet * 3. All advertising materials mentioning features or use of this software
46129198Scognet *    must display the following acknowledgement:
47129198Scognet *      This product includes software developed by Christopher G. Demetriou
48129198Scognet *	for the NetBSD Project.
49129198Scognet * 4. The name of the author may not be used to endorse or promote products
50129198Scognet *    derived from this software without specific prior written permission
51129198Scognet *
52129198Scognet * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
53129198Scognet * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
54129198Scognet * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55129198Scognet * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
56129198Scognet * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
57129198Scognet * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
58129198Scognet * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
59129198Scognet * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
60129198Scognet * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
61129198Scognet * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62129198Scognet *
63129198Scognet * $FreeBSD$
64129198Scognet */
65129198Scognet
66129198Scognet#ifndef _MACHINE_BUS_H_
67129198Scognet#define _MACHINE_BUS_H_
68129198Scognet
69145253Simp#include <machine/_bus.h>
70129198Scognet
71129198Scognet/*
72129198Scognet *	int bus_space_map  (bus_space_tag_t t, bus_addr_t addr,
73129198Scognet *	    bus_size_t size, int flags, bus_space_handle_t *bshp);
74129198Scognet *
75129198Scognet * Map a region of bus space.
76129198Scognet */
77129198Scognet
78129198Scognet#define	BUS_SPACE_MAP_CACHEABLE		0x01
79129198Scognet#define	BUS_SPACE_MAP_LINEAR		0x02
80129198Scognet#define	BUS_SPACE_MAP_PREFETCHABLE     	0x04
81129198Scognet
82277512Sian/*
83277512Sian * Bus space for ARM.
84277512Sian *
85277512Sian * The functions used most often are grouped together at the beginning to ensure
86277512Sian * that all the data fits into a single cache line.  The inline implementations
87277512Sian * of single read/write access these values a lot.
88277512Sian */
89129198Scognetstruct bus_space {
90277512Sian	/* Read/write single and barrier: the most commonly used functions. */
91277512Sian	uint8_t	 (*bs_r_1)(bus_space_tag_t, bus_space_handle_t, bus_size_t);
92277512Sian	uint32_t (*bs_r_4)(bus_space_tag_t, bus_space_handle_t, bus_size_t);
93277512Sian	void	 (*bs_w_1)(bus_space_tag_t, bus_space_handle_t,
94277512Sian			   bus_size_t, uint8_t);
95277512Sian	void	 (*bs_w_4)(bus_space_tag_t, bus_space_handle_t,
96277512Sian			   bus_size_t, uint32_t);
97277512Sian	void	 (*bs_barrier)(bus_space_tag_t, bus_space_handle_t,
98277512Sian			       bus_size_t, bus_size_t, int);
99129198Scognet
100277512Sian	/* Backlink to parent (if copied), and implementation private data. */
101277512Sian	struct bus_space *bs_parent;
102277512Sian	void		 *bs_privdata;
103277512Sian
104129198Scognet	/* mapping/unmapping */
105277460Sian	int		(*bs_map) (bus_space_tag_t, bus_addr_t, bus_size_t,
106129198Scognet			    int, bus_space_handle_t *);
107277460Sian	void		(*bs_unmap) (bus_space_tag_t, bus_space_handle_t, bus_size_t);
108277460Sian	int		(*bs_subregion) (bus_space_tag_t, bus_space_handle_t,
109129198Scognet			    bus_size_t, bus_size_t, bus_space_handle_t *);
110129198Scognet
111129198Scognet	/* allocation/deallocation */
112277460Sian	int		(*bs_alloc) (bus_space_tag_t, bus_addr_t, bus_addr_t,
113129198Scognet			    bus_size_t, bus_size_t, bus_size_t, int,
114129198Scognet			    bus_addr_t *, bus_space_handle_t *);
115277460Sian	void		(*bs_free) (bus_space_tag_t, bus_space_handle_t,
116129198Scognet			    bus_size_t);
117129198Scognet
118277512Sian	/* Read single, the less commonly used functions. */
119277460Sian	uint16_t	(*bs_r_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t);
120277460Sian	uint64_t	(*bs_r_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t);
121129198Scognet
122129198Scognet	/* read multiple */
123277460Sian	void		(*bs_rm_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
124277460Sian	    uint8_t *, bus_size_t);
125277460Sian	void		(*bs_rm_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
126277460Sian	    uint16_t *, bus_size_t);
127277460Sian	void		(*bs_rm_4) (bus_space_tag_t, bus_space_handle_t,
128277460Sian			    bus_size_t, uint32_t *, bus_size_t);
129277460Sian	void		(*bs_rm_8) (bus_space_tag_t, bus_space_handle_t,
130277460Sian			    bus_size_t, uint64_t *, bus_size_t);
131290648Smmel
132129198Scognet	/* read region */
133277460Sian	void		(*bs_rr_1) (bus_space_tag_t, bus_space_handle_t,
134277460Sian			    bus_size_t, uint8_t *, bus_size_t);
135277460Sian	void		(*bs_rr_2) (bus_space_tag_t, bus_space_handle_t,
136277460Sian			    bus_size_t, uint16_t *, bus_size_t);
137277460Sian	void		(*bs_rr_4) (bus_space_tag_t, bus_space_handle_t,
138277460Sian			    bus_size_t, uint32_t *, bus_size_t);
139277460Sian	void		(*bs_rr_8) (bus_space_tag_t, bus_space_handle_t,
140277460Sian			    bus_size_t, uint64_t *, bus_size_t);
141290648Smmel
142277512Sian	/* Write single, the less commonly used functions. */
143277460Sian	void		(*bs_w_2) (bus_space_tag_t, bus_space_handle_t,
144277460Sian			    bus_size_t, uint16_t);
145277460Sian	void		(*bs_w_8) (bus_space_tag_t, bus_space_handle_t,
146277460Sian			    bus_size_t, uint64_t);
147129198Scognet
148129198Scognet	/* write multiple */
149277460Sian	void		(*bs_wm_1) (bus_space_tag_t, bus_space_handle_t,
150277460Sian			    bus_size_t, const uint8_t *, bus_size_t);
151277460Sian	void		(*bs_wm_2) (bus_space_tag_t, bus_space_handle_t,
152277460Sian			    bus_size_t, const uint16_t *, bus_size_t);
153277460Sian	void		(*bs_wm_4) (bus_space_tag_t, bus_space_handle_t,
154277460Sian			    bus_size_t, const uint32_t *, bus_size_t);
155277460Sian	void		(*bs_wm_8) (bus_space_tag_t, bus_space_handle_t,
156277460Sian			    bus_size_t, const uint64_t *, bus_size_t);
157290648Smmel
158129198Scognet	/* write region */
159277460Sian	void		(*bs_wr_1) (bus_space_tag_t, bus_space_handle_t,
160277460Sian			    bus_size_t, const uint8_t *, bus_size_t);
161277460Sian	void		(*bs_wr_2) (bus_space_tag_t, bus_space_handle_t,
162277460Sian			    bus_size_t, const uint16_t *, bus_size_t);
163277460Sian	void		(*bs_wr_4) (bus_space_tag_t, bus_space_handle_t,
164277460Sian			    bus_size_t, const uint32_t *, bus_size_t);
165277460Sian	void		(*bs_wr_8) (bus_space_tag_t, bus_space_handle_t,
166277460Sian			    bus_size_t, const uint64_t *, bus_size_t);
167129198Scognet
168129198Scognet	/* set multiple */
169277460Sian	void		(*bs_sm_1) (bus_space_tag_t, bus_space_handle_t,
170277460Sian			    bus_size_t, uint8_t, bus_size_t);
171277460Sian	void		(*bs_sm_2) (bus_space_tag_t, bus_space_handle_t,
172277460Sian			    bus_size_t, uint16_t, bus_size_t);
173277460Sian	void		(*bs_sm_4) (bus_space_tag_t, bus_space_handle_t,
174277460Sian			    bus_size_t, uint32_t, bus_size_t);
175277460Sian	void		(*bs_sm_8) (bus_space_tag_t, bus_space_handle_t,
176277460Sian			    bus_size_t, uint64_t, bus_size_t);
177129198Scognet
178129198Scognet	/* set region */
179277460Sian	void		(*bs_sr_1) (bus_space_tag_t, bus_space_handle_t,
180277460Sian			    bus_size_t, uint8_t, bus_size_t);
181277460Sian	void		(*bs_sr_2) (bus_space_tag_t, bus_space_handle_t,
182277460Sian			    bus_size_t, uint16_t, bus_size_t);
183277460Sian	void		(*bs_sr_4) (bus_space_tag_t, bus_space_handle_t,
184277460Sian			    bus_size_t, uint32_t, bus_size_t);
185277460Sian	void		(*bs_sr_8) (bus_space_tag_t, bus_space_handle_t,
186277460Sian			    bus_size_t, uint64_t, bus_size_t);
187129198Scognet
188129198Scognet	/* copy */
189277460Sian	void		(*bs_c_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
190129198Scognet			    bus_space_handle_t, bus_size_t, bus_size_t);
191277460Sian	void		(*bs_c_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
192129198Scognet			    bus_space_handle_t, bus_size_t, bus_size_t);
193277460Sian	void		(*bs_c_4) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
194129198Scognet			    bus_space_handle_t, bus_size_t, bus_size_t);
195277460Sian	void		(*bs_c_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
196129198Scognet			    bus_space_handle_t, bus_size_t, bus_size_t);
197129198Scognet
198164424Ssam	/* read stream (single) */
199277460Sian	uint8_t	(*bs_r_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t);
200277460Sian	uint16_t	(*bs_r_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t);
201277460Sian	uint32_t	(*bs_r_4_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t);
202277460Sian	uint64_t	(*bs_r_8_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t);
203164424Ssam
204164424Ssam	/* read multiple stream */
205277460Sian	void		(*bs_rm_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
206277460Sian	    uint8_t *, bus_size_t);
207277460Sian	void		(*bs_rm_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t,
208277460Sian	    uint16_t *, bus_size_t);
209277460Sian	void		(*bs_rm_4_s) (bus_space_tag_t, bus_space_handle_t,
210277460Sian			    bus_size_t, uint32_t *, bus_size_t);
211277460Sian	void		(*bs_rm_8_s) (bus_space_tag_t, bus_space_handle_t,
212277460Sian			    bus_size_t, uint64_t *, bus_size_t);
213290648Smmel
214164424Ssam	/* read region stream */
215277460Sian	void		(*bs_rr_1_s) (bus_space_tag_t, bus_space_handle_t,
216277460Sian			    bus_size_t, uint8_t *, bus_size_t);
217277460Sian	void		(*bs_rr_2_s) (bus_space_tag_t, bus_space_handle_t,
218277460Sian			    bus_size_t, uint16_t *, bus_size_t);
219277460Sian	void		(*bs_rr_4_s) (bus_space_tag_t, bus_space_handle_t,
220277460Sian			    bus_size_t, uint32_t *, bus_size_t);
221277460Sian	void		(*bs_rr_8_s) (bus_space_tag_t, bus_space_handle_t,
222277460Sian			    bus_size_t, uint64_t *, bus_size_t);
223290648Smmel
224164424Ssam	/* write stream (single) */
225277460Sian	void		(*bs_w_1_s) (bus_space_tag_t, bus_space_handle_t,
226277460Sian			    bus_size_t, uint8_t);
227277460Sian	void		(*bs_w_2_s) (bus_space_tag_t, bus_space_handle_t,
228277460Sian			    bus_size_t, uint16_t);
229277460Sian	void		(*bs_w_4_s) (bus_space_tag_t, bus_space_handle_t,
230277460Sian			    bus_size_t, uint32_t);
231277460Sian	void		(*bs_w_8_s) (bus_space_tag_t, bus_space_handle_t,
232277460Sian			    bus_size_t, uint64_t);
233164424Ssam
234164424Ssam	/* write multiple stream */
235277460Sian	void		(*bs_wm_1_s) (bus_space_tag_t, bus_space_handle_t,
236277460Sian			    bus_size_t, const uint8_t *, bus_size_t);
237277460Sian	void		(*bs_wm_2_s) (bus_space_tag_t, bus_space_handle_t,
238277460Sian			    bus_size_t, const uint16_t *, bus_size_t);
239277460Sian	void		(*bs_wm_4_s) (bus_space_tag_t, bus_space_handle_t,
240277460Sian			    bus_size_t, const uint32_t *, bus_size_t);
241277460Sian	void		(*bs_wm_8_s) (bus_space_tag_t, bus_space_handle_t,
242277460Sian			    bus_size_t, const uint64_t *, bus_size_t);
243290648Smmel
244164424Ssam	/* write region stream */
245277460Sian	void		(*bs_wr_1_s) (bus_space_tag_t, bus_space_handle_t,
246277460Sian			    bus_size_t, const uint8_t *, bus_size_t);
247277460Sian	void		(*bs_wr_2_s) (bus_space_tag_t, bus_space_handle_t,
248277460Sian			    bus_size_t, const uint16_t *, bus_size_t);
249277460Sian	void		(*bs_wr_4_s) (bus_space_tag_t, bus_space_handle_t,
250277460Sian			    bus_size_t, const uint32_t *, bus_size_t);
251277460Sian	void		(*bs_wr_8_s) (bus_space_tag_t, bus_space_handle_t,
252277460Sian			    bus_size_t, const uint64_t *, bus_size_t);
253129198Scognet};
254129198Scognet
255291131Sandrew#if __ARM_ARCH < 6
256277473Sianextern bus_space_tag_t arm_base_bs_tag;
257291131Sandrew#endif
258129198Scognet
259129198Scognet/*
260129198Scognet * Utility macros; INTERNAL USE ONLY.
261129198Scognet */
262129198Scognet#define	__bs_c(a,b)		__CONCAT(a,b)
263129198Scognet#define	__bs_opname(op,size)	__bs_c(__bs_c(__bs_c(bs_,op),_),size)
264129198Scognet
265129198Scognet#define	__bs_nonsingle(type, sz, t, h, o, a, c)				\
266277460Sian	(*(t)->__bs_opname(type,sz))((t), h, o, a, c)
267129198Scognet#define	__bs_set(type, sz, t, h, o, v, c)				\
268277460Sian	(*(t)->__bs_opname(type,sz))((t), h, o, v, c)
269129198Scognet#define	__bs_copy(sz, t, h1, o1, h2, o2, cnt)				\
270277460Sian	(*(t)->__bs_opname(c,sz))((t), h1, o1, h2, o2, cnt)
271129198Scognet
272164424Ssam#define	__bs_opname_s(op,size)	__bs_c(__bs_c(__bs_c(__bs_c(bs_,op),_),size),_s)
273164424Ssam#define	__bs_rs_s(sz, t, h, o)						\
274277460Sian	(*(t)->__bs_opname_s(r,sz))((t), h, o)
275164424Ssam#define	__bs_ws_s(sz, t, h, o, v)					\
276277460Sian	(*(t)->__bs_opname_s(w,sz))((t), h, o, v)
277164424Ssam#define	__bs_nonsingle_s(type, sz, t, h, o, a, c)			\
278277460Sian	(*(t)->__bs_opname_s(type,sz))((t), h, o, a, c)
279129198Scognet
280164424Ssam
281277454Sian#define __generate_inline_bs_rs(IFN, MBR, TYP)					\
282277454Sian	static inline TYP						\
283277454Sian	IFN(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)	\
284277454Sian	{								\
285277454Sian									\
286277454Sian		if (__predict_true(t->MBR == NULL))			\
287277454Sian			return (*(volatile TYP *)(h + o));		\
288277454Sian		else							\
289277460Sian			return (t->MBR(t, h, o));		\
290277454Sian	}
291277454Sian
292277454Sian#define __generate_inline_bs_ws(IFN, MBR, TYP)					\
293277454Sian	static inline void						\
294277454Sian	IFN(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, TYP v)\
295277454Sian	{								\
296277454Sian									\
297277454Sian		if (__predict_true(t->MBR == NULL))			\
298277454Sian			*(volatile TYP *)(h + o) = v;			\
299277454Sian		else							\
300277460Sian			t->MBR(t, h, o, v);			\
301277454Sian	}
302277454Sian
303129198Scognet/*
304129198Scognet * Mapping and unmapping operations.
305129198Scognet */
306129198Scognet#define	bus_space_map(t, a, s, c, hp)					\
307277460Sian	(*(t)->bs_map)((t), (a), (s), (c), (hp))
308129198Scognet#define	bus_space_unmap(t, h, s)					\
309277460Sian	(*(t)->bs_unmap)((t), (h), (s))
310129198Scognet#define	bus_space_subregion(t, h, o, s, hp)				\
311277460Sian	(*(t)->bs_subregion)((t), (h), (o), (s), (hp))
312129198Scognet
313129198Scognet
314129198Scognet/*
315129198Scognet * Allocation and deallocation operations.
316129198Scognet */
317129198Scognet#define	bus_space_alloc(t, rs, re, s, a, b, c, ap, hp)			\
318277460Sian	(*(t)->bs_alloc)((t), (rs), (re), (s), (a), (b),	\
319129198Scognet	    (c), (ap), (hp))
320129198Scognet#define	bus_space_free(t, h, s)						\
321277460Sian	(*(t)->bs_free)((t), (h), (s))
322129198Scognet
323129198Scognet/*
324129198Scognet * Bus barrier operations.
325129198Scognet */
326129198Scognet#define	bus_space_barrier(t, h, o, l, f)				\
327277460Sian	(*(t)->bs_barrier)((t), (h), (o), (l), (f))
328129198Scognet
329129198Scognet#define	BUS_SPACE_BARRIER_READ	0x01
330129198Scognet#define	BUS_SPACE_BARRIER_WRITE	0x02
331129198Scognet
332129198Scognet/*
333129198Scognet * Bus read (single) operations.
334129198Scognet */
335277454Sian__generate_inline_bs_rs(bus_space_read_1, bs_r_1, uint8_t);
336277454Sian__generate_inline_bs_rs(bus_space_read_2, bs_r_2, uint16_t);
337277454Sian__generate_inline_bs_rs(bus_space_read_4, bs_r_4, uint32_t);
338277454Sian__generate_inline_bs_rs(bus_space_read_8, bs_r_8, uint64_t);
339129198Scognet
340290648Smmel__generate_inline_bs_rs(bus_space_read_stream_1, bs_r_1_s, uint8_t);
341290648Smmel__generate_inline_bs_rs(bus_space_read_stream_2, bs_r_2_s, uint16_t);
342290648Smmel__generate_inline_bs_rs(bus_space_read_stream_4, bs_r_4_s, uint32_t);
343290648Smmel__generate_inline_bs_rs(bus_space_read_stream_8, bs_r_8_s, uint64_t);
344129198Scognet
345129198Scognet/*
346129198Scognet * Bus read multiple operations.
347129198Scognet */
348129198Scognet#define	bus_space_read_multi_1(t, h, o, a, c)				\
349129198Scognet	__bs_nonsingle(rm,1,(t),(h),(o),(a),(c))
350129198Scognet#define	bus_space_read_multi_2(t, h, o, a, c)				\
351129198Scognet	__bs_nonsingle(rm,2,(t),(h),(o),(a),(c))
352129198Scognet#define	bus_space_read_multi_4(t, h, o, a, c)				\
353129198Scognet	__bs_nonsingle(rm,4,(t),(h),(o),(a),(c))
354129198Scognet#define	bus_space_read_multi_8(t, h, o, a, c)				\
355129198Scognet	__bs_nonsingle(rm,8,(t),(h),(o),(a),(c))
356129198Scognet
357164424Ssam#define	bus_space_read_multi_stream_1(t, h, o, a, c)			\
358164424Ssam	__bs_nonsingle_s(rm,1,(t),(h),(o),(a),(c))
359164424Ssam#define	bus_space_read_multi_stream_2(t, h, o, a, c)			\
360164424Ssam	__bs_nonsingle_s(rm,2,(t),(h),(o),(a),(c))
361164424Ssam#define	bus_space_read_multi_stream_4(t, h, o, a, c)			\
362164424Ssam	__bs_nonsingle_s(rm,4,(t),(h),(o),(a),(c))
363164424Ssam#define	bus_space_read_multi_stream_8(t, h, o, a, c)			\
364164424Ssam	__bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c))
365129198Scognet
366164424Ssam
367129198Scognet/*
368129198Scognet * Bus read region operations.
369129198Scognet */
370129198Scognet#define	bus_space_read_region_1(t, h, o, a, c)				\
371129198Scognet	__bs_nonsingle(rr,1,(t),(h),(o),(a),(c))
372129198Scognet#define	bus_space_read_region_2(t, h, o, a, c)				\
373129198Scognet	__bs_nonsingle(rr,2,(t),(h),(o),(a),(c))
374129198Scognet#define	bus_space_read_region_4(t, h, o, a, c)				\
375129198Scognet	__bs_nonsingle(rr,4,(t),(h),(o),(a),(c))
376129198Scognet#define	bus_space_read_region_8(t, h, o, a, c)				\
377129198Scognet	__bs_nonsingle(rr,8,(t),(h),(o),(a),(c))
378129198Scognet
379164424Ssam#define	bus_space_read_region_stream_1(t, h, o, a, c)			\
380164424Ssam	__bs_nonsingle_s(rr,1,(t),(h),(o),(a),(c))
381164424Ssam#define	bus_space_read_region_stream_2(t, h, o, a, c)			\
382164424Ssam	__bs_nonsingle_s(rr,2,(t),(h),(o),(a),(c))
383164424Ssam#define	bus_space_read_region_stream_4(t, h, o, a, c)			\
384164424Ssam	__bs_nonsingle_s(rr,4,(t),(h),(o),(a),(c))
385164424Ssam#define	bus_space_read_region_stream_8(t, h, o, a, c)			\
386164424Ssam	__bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c))
387129198Scognet
388164424Ssam
389129198Scognet/*
390129198Scognet * Bus write (single) operations.
391129198Scognet */
392277454Sian__generate_inline_bs_ws(bus_space_write_1, bs_w_1, uint8_t);
393277454Sian__generate_inline_bs_ws(bus_space_write_2, bs_w_2, uint16_t);
394277454Sian__generate_inline_bs_ws(bus_space_write_4, bs_w_4, uint32_t);
395277454Sian__generate_inline_bs_ws(bus_space_write_8, bs_w_8, uint64_t);
396129198Scognet
397290648Smmel__generate_inline_bs_ws(bus_space_write_stream_1, bs_w_1_s, uint8_t);
398290648Smmel__generate_inline_bs_ws(bus_space_write_stream_2, bs_w_2_s, uint16_t);
399290648Smmel__generate_inline_bs_ws(bus_space_write_stream_4, bs_w_4_s, uint32_t);
400290648Smmel__generate_inline_bs_ws(bus_space_write_stream_8, bs_w_8_s, uint64_t);
401129198Scognet
402164424Ssam
403129198Scognet/*
404129198Scognet * Bus write multiple operations.
405129198Scognet */
406129198Scognet#define	bus_space_write_multi_1(t, h, o, a, c)				\
407129198Scognet	__bs_nonsingle(wm,1,(t),(h),(o),(a),(c))
408129198Scognet#define	bus_space_write_multi_2(t, h, o, a, c)				\
409129198Scognet	__bs_nonsingle(wm,2,(t),(h),(o),(a),(c))
410129198Scognet#define	bus_space_write_multi_4(t, h, o, a, c)				\
411129198Scognet	__bs_nonsingle(wm,4,(t),(h),(o),(a),(c))
412129198Scognet#define	bus_space_write_multi_8(t, h, o, a, c)				\
413129198Scognet	__bs_nonsingle(wm,8,(t),(h),(o),(a),(c))
414129198Scognet
415164424Ssam#define	bus_space_write_multi_stream_1(t, h, o, a, c)			\
416164424Ssam	__bs_nonsingle_s(wm,1,(t),(h),(o),(a),(c))
417164424Ssam#define	bus_space_write_multi_stream_2(t, h, o, a, c)			\
418164424Ssam	__bs_nonsingle_s(wm,2,(t),(h),(o),(a),(c))
419164424Ssam#define	bus_space_write_multi_stream_4(t, h, o, a, c)			\
420164424Ssam	__bs_nonsingle_s(wm,4,(t),(h),(o),(a),(c))
421164424Ssam#define	bus_space_write_multi_stream_8(t, h, o, a, c)			\
422164424Ssam	__bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c))
423129198Scognet
424164424Ssam
425129198Scognet/*
426129198Scognet * Bus write region operations.
427129198Scognet */
428129198Scognet#define	bus_space_write_region_1(t, h, o, a, c)				\
429129198Scognet	__bs_nonsingle(wr,1,(t),(h),(o),(a),(c))
430129198Scognet#define	bus_space_write_region_2(t, h, o, a, c)				\
431129198Scognet	__bs_nonsingle(wr,2,(t),(h),(o),(a),(c))
432129198Scognet#define	bus_space_write_region_4(t, h, o, a, c)				\
433129198Scognet	__bs_nonsingle(wr,4,(t),(h),(o),(a),(c))
434129198Scognet#define	bus_space_write_region_8(t, h, o, a, c)				\
435129198Scognet	__bs_nonsingle(wr,8,(t),(h),(o),(a),(c))
436129198Scognet
437164424Ssam#define	bus_space_write_region_stream_1(t, h, o, a, c)			\
438164424Ssam	__bs_nonsingle_s(wr,1,(t),(h),(o),(a),(c))
439164424Ssam#define	bus_space_write_region_stream_2(t, h, o, a, c)			\
440164424Ssam	__bs_nonsingle_s(wr,2,(t),(h),(o),(a),(c))
441164424Ssam#define	bus_space_write_region_stream_4(t, h, o, a, c)			\
442164424Ssam	__bs_nonsingle_s(wr,4,(t),(h),(o),(a),(c))
443164424Ssam#define	bus_space_write_region_stream_8(t, h, o, a, c)			\
444164424Ssam	__bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c))
445129198Scognet
446164424Ssam
447129198Scognet/*
448129198Scognet * Set multiple operations.
449129198Scognet */
450216143Sbrucec#define	bus_space_set_multi_1(t, h, o, v, c)				\
451129198Scognet	__bs_set(sm,1,(t),(h),(o),(v),(c))
452216143Sbrucec#define	bus_space_set_multi_2(t, h, o, v, c)				\
453129198Scognet	__bs_set(sm,2,(t),(h),(o),(v),(c))
454216143Sbrucec#define	bus_space_set_multi_4(t, h, o, v, c)				\
455129198Scognet	__bs_set(sm,4,(t),(h),(o),(v),(c))
456216143Sbrucec#define	bus_space_set_multi_8(t, h, o, v, c)				\
457129198Scognet	__bs_set(sm,8,(t),(h),(o),(v),(c))
458129198Scognet
459129198Scognet
460129198Scognet/*
461129198Scognet * Set region operations.
462129198Scognet */
463129198Scognet#define	bus_space_set_region_1(t, h, o, v, c)				\
464129198Scognet	__bs_set(sr,1,(t),(h),(o),(v),(c))
465129198Scognet#define	bus_space_set_region_2(t, h, o, v, c)				\
466129198Scognet	__bs_set(sr,2,(t),(h),(o),(v),(c))
467129198Scognet#define	bus_space_set_region_4(t, h, o, v, c)				\
468129198Scognet	__bs_set(sr,4,(t),(h),(o),(v),(c))
469129198Scognet#define	bus_space_set_region_8(t, h, o, v, c)				\
470129198Scognet	__bs_set(sr,8,(t),(h),(o),(v),(c))
471129198Scognet
472129198Scognet
473129198Scognet/*
474129198Scognet * Copy operations.
475129198Scognet */
476216143Sbrucec#define	bus_space_copy_region_1(t, h1, o1, h2, o2, c)				\
477129198Scognet	__bs_copy(1, t, h1, o1, h2, o2, c)
478216143Sbrucec#define	bus_space_copy_region_2(t, h1, o1, h2, o2, c)				\
479129198Scognet	__bs_copy(2, t, h1, o1, h2, o2, c)
480216143Sbrucec#define	bus_space_copy_region_4(t, h1, o1, h2, o2, c)				\
481129198Scognet	__bs_copy(4, t, h1, o1, h2, o2, c)
482216143Sbrucec#define	bus_space_copy_region_8(t, h1, o1, h2, o2, c)				\
483129198Scognet	__bs_copy(8, t, h1, o1, h2, o2, c)
484129198Scognet
485129198Scognet/*
486129198Scognet * Macros to provide prototypes for all the functions used in the
487129198Scognet * bus_space structure
488129198Scognet */
489129198Scognet
490129198Scognet#define bs_map_proto(f)							\
491277460Sianint	__bs_c(f,_bs_map) (bus_space_tag_t t, bus_addr_t addr,		\
492129198Scognet	    bus_size_t size, int cacheable, bus_space_handle_t *bshp);
493129198Scognet
494129198Scognet#define bs_unmap_proto(f)						\
495277460Sianvoid	__bs_c(f,_bs_unmap) (bus_space_tag_t t, bus_space_handle_t bsh,		\
496164424Ssam	    bus_size_t size);
497129198Scognet
498129198Scognet#define bs_subregion_proto(f)						\
499277460Sianint	__bs_c(f,_bs_subregion) (bus_space_tag_t t, bus_space_handle_t bsh,	\
500129198Scognet	    bus_size_t offset, bus_size_t size, 			\
501129198Scognet	    bus_space_handle_t *nbshp);
502129198Scognet
503129198Scognet#define bs_alloc_proto(f)						\
504277460Sianint	__bs_c(f,_bs_alloc) (bus_space_tag_t t, bus_addr_t rstart,		\
505129198Scognet	    bus_addr_t rend, bus_size_t size, bus_size_t align,		\
506129198Scognet	    bus_size_t boundary, int cacheable, bus_addr_t *addrp,	\
507129198Scognet	    bus_space_handle_t *bshp);
508129198Scognet
509129198Scognet#define bs_free_proto(f)						\
510277460Sianvoid	__bs_c(f,_bs_free) (bus_space_tag_t t, bus_space_handle_t bsh,	\
511129198Scognet	    bus_size_t size);
512129198Scognet
513129198Scognet#define bs_mmap_proto(f)						\
514130585Sphkint	__bs_c(f,_bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int);
515129198Scognet
516129198Scognet#define bs_barrier_proto(f)						\
517277460Sianvoid	__bs_c(f,_bs_barrier) (bus_space_tag_t t, bus_space_handle_t bsh,	\
518129198Scognet	    bus_size_t offset, bus_size_t len, int flags);
519129198Scognet
520129198Scognet#define	bs_r_1_proto(f)							\
521277460Sianuint8_t	__bs_c(f,_bs_r_1) (bus_space_tag_t t, bus_space_handle_t bsh,	\
522129198Scognet		    bus_size_t offset);
523129198Scognet
524129198Scognet#define	bs_r_2_proto(f)							\
525277460Sianuint16_t	__bs_c(f,_bs_r_2) (bus_space_tag_t t, bus_space_handle_t bsh,	\
526129198Scognet		    bus_size_t offset);
527129198Scognet
528129198Scognet#define	bs_r_4_proto(f)							\
529277460Sianuint32_t	__bs_c(f,_bs_r_4) (bus_space_tag_t t, bus_space_handle_t bsh,	\
530129198Scognet		    bus_size_t offset);
531129198Scognet
532129198Scognet#define	bs_r_8_proto(f)							\
533277460Sianuint64_t	__bs_c(f,_bs_r_8) (bus_space_tag_t t, bus_space_handle_t bsh,	\
534129198Scognet		    bus_size_t offset);
535129198Scognet
536164424Ssam#define	bs_r_1_s_proto(f)						\
537277460Sianuint8_t	__bs_c(f,_bs_r_1_s) (bus_space_tag_t t, bus_space_handle_t bsh,	\
538164424Ssam		    bus_size_t offset);
539164424Ssam
540164424Ssam#define	bs_r_2_s_proto(f)						\
541277460Sianuint16_t	__bs_c(f,_bs_r_2_s) (bus_space_tag_t t, bus_space_handle_t bsh,	\
542164424Ssam		    bus_size_t offset);
543164424Ssam
544164424Ssam#define	bs_r_4_s_proto(f)						\
545277460Sianuint32_t	__bs_c(f,_bs_r_4_s) (bus_space_tag_t t, bus_space_handle_t bsh,	\
546164424Ssam		    bus_size_t offset);
547164424Ssam
548129198Scognet#define	bs_w_1_proto(f)							\
549277460Sianvoid	__bs_c(f,_bs_w_1) (bus_space_tag_t t, bus_space_handle_t bsh,		\
550277460Sian	    bus_size_t offset, uint8_t value);
551129198Scognet
552129198Scognet#define	bs_w_2_proto(f)							\
553277460Sianvoid	__bs_c(f,_bs_w_2) (bus_space_tag_t t, bus_space_handle_t bsh,		\
554277460Sian	    bus_size_t offset, uint16_t value);
555129198Scognet
556129198Scognet#define	bs_w_4_proto(f)							\
557277460Sianvoid	__bs_c(f,_bs_w_4) (bus_space_tag_t t, bus_space_handle_t bsh,		\
558277460Sian	    bus_size_t offset, uint32_t value);
559129198Scognet
560129198Scognet#define	bs_w_8_proto(f)							\
561277460Sianvoid	__bs_c(f,_bs_w_8) (bus_space_tag_t t, bus_space_handle_t bsh,		\
562277460Sian	    bus_size_t offset, uint64_t value);
563129198Scognet
564164424Ssam#define	bs_w_1_s_proto(f)						\
565277460Sianvoid	__bs_c(f,_bs_w_1_s) (bus_space_tag_t t, bus_space_handle_t bsh,		\
566277460Sian	    bus_size_t offset, uint8_t value);
567164424Ssam
568164424Ssam#define	bs_w_2_s_proto(f)						\
569277460Sianvoid	__bs_c(f,_bs_w_2_s) (bus_space_tag_t t, bus_space_handle_t bsh,		\
570277460Sian	    bus_size_t offset, uint16_t value);
571164424Ssam
572164424Ssam#define	bs_w_4_s_proto(f)						\
573277460Sianvoid	__bs_c(f,_bs_w_4_s) (bus_space_tag_t t, bus_space_handle_t bsh,		\
574277460Sian	    bus_size_t offset, uint32_t value);
575164424Ssam
576129198Scognet#define	bs_rm_1_proto(f)						\
577277460Sianvoid	__bs_c(f,_bs_rm_1) (bus_space_tag_t t, bus_space_handle_t bsh,	\
578277460Sian	    bus_size_t offset, uint8_t *addr, bus_size_t count);
579129198Scognet
580129198Scognet#define	bs_rm_2_proto(f)						\
581277460Sianvoid	__bs_c(f,_bs_rm_2) (bus_space_tag_t t, bus_space_handle_t bsh,	\
582277460Sian	    bus_size_t offset, uint16_t *addr, bus_size_t count);
583129198Scognet
584129198Scognet#define	bs_rm_4_proto(f)						\
585277460Sianvoid	__bs_c(f,_bs_rm_4) (bus_space_tag_t t, bus_space_handle_t bsh,	\
586290648Smmel	    bus_size_t offset, uint32_t *addr, bus_size_t count);
587129198Scognet
588129198Scognet#define	bs_rm_8_proto(f)						\
589277460Sianvoid	__bs_c(f,_bs_rm_8) (bus_space_tag_t t, bus_space_handle_t bsh,	\
590277460Sian	    bus_size_t offset, uint64_t *addr, bus_size_t count);
591129198Scognet
592129198Scognet#define	bs_wm_1_proto(f)						\
593277460Sianvoid	__bs_c(f,_bs_wm_1) (bus_space_tag_t t, bus_space_handle_t bsh,	\
594277460Sian	    bus_size_t offset, const uint8_t *addr, bus_size_t count);
595129198Scognet
596129198Scognet#define	bs_wm_2_proto(f)						\
597277460Sianvoid	__bs_c(f,_bs_wm_2) (bus_space_tag_t t, bus_space_handle_t bsh,	\
598277460Sian	    bus_size_t offset, const uint16_t *addr, bus_size_t count);
599129198Scognet
600129198Scognet#define	bs_wm_4_proto(f)						\
601277460Sianvoid	__bs_c(f,_bs_wm_4) (bus_space_tag_t t, bus_space_handle_t bsh,	\
602277460Sian	    bus_size_t offset, const uint32_t *addr, bus_size_t count);
603129198Scognet
604129198Scognet#define	bs_wm_8_proto(f)						\
605277460Sianvoid	__bs_c(f,_bs_wm_8) (bus_space_tag_t t, bus_space_handle_t bsh,	\
606277460Sian	    bus_size_t offset, const uint64_t *addr, bus_size_t count);
607129198Scognet
608129198Scognet#define	bs_rr_1_proto(f)						\
609277460Sianvoid	__bs_c(f, _bs_rr_1) (bus_space_tag_t t, bus_space_handle_t bsh,	\
610277460Sian	    bus_size_t offset, uint8_t *addr, bus_size_t count);
611129198Scognet
612129198Scognet#define	bs_rr_2_proto(f)						\
613277460Sianvoid	__bs_c(f, _bs_rr_2) (bus_space_tag_t t, bus_space_handle_t bsh,	\
614277460Sian	    bus_size_t offset, uint16_t *addr, bus_size_t count);
615129198Scognet
616129198Scognet#define	bs_rr_4_proto(f)						\
617277460Sianvoid	__bs_c(f, _bs_rr_4) (bus_space_tag_t t, bus_space_handle_t bsh,	\
618277460Sian	    bus_size_t offset, uint32_t *addr, bus_size_t count);
619129198Scognet
620129198Scognet#define	bs_rr_8_proto(f)						\
621277460Sianvoid	__bs_c(f, _bs_rr_8) (bus_space_tag_t t, bus_space_handle_t bsh,	\
622277460Sian	    bus_size_t offset, uint64_t *addr, bus_size_t count);
623129198Scognet
624129198Scognet#define	bs_wr_1_proto(f)						\
625277460Sianvoid	__bs_c(f, _bs_wr_1) (bus_space_tag_t t, bus_space_handle_t bsh,	\
626277460Sian	    bus_size_t offset, const uint8_t *addr, bus_size_t count);
627129198Scognet
628129198Scognet#define	bs_wr_2_proto(f)						\
629277460Sianvoid	__bs_c(f, _bs_wr_2) (bus_space_tag_t t, bus_space_handle_t bsh,	\
630277460Sian	    bus_size_t offset, const uint16_t *addr, bus_size_t count);
631129198Scognet
632129198Scognet#define	bs_wr_4_proto(f)						\
633277460Sianvoid	__bs_c(f, _bs_wr_4) (bus_space_tag_t t, bus_space_handle_t bsh,	\
634277460Sian	    bus_size_t offset, const uint32_t *addr, bus_size_t count);
635129198Scognet
636129198Scognet#define	bs_wr_8_proto(f)						\
637277460Sianvoid	__bs_c(f, _bs_wr_8) (bus_space_tag_t t, bus_space_handle_t bsh,	\
638277460Sian	    bus_size_t offset, const uint64_t *addr, bus_size_t count);
639129198Scognet
640129198Scognet#define	bs_sm_1_proto(f)						\
641277460Sianvoid	__bs_c(f,_bs_sm_1) (bus_space_tag_t t, bus_space_handle_t bsh,	\
642277460Sian	    bus_size_t offset, uint8_t value, bus_size_t count);
643129198Scognet
644129198Scognet#define	bs_sm_2_proto(f)						\
645277460Sianvoid	__bs_c(f,_bs_sm_2) (bus_space_tag_t t, bus_space_handle_t bsh,	\
646277460Sian	    bus_size_t offset, uint16_t value, bus_size_t count);
647129198Scognet
648129198Scognet#define	bs_sm_4_proto(f)						\
649277460Sianvoid	__bs_c(f,_bs_sm_4) (bus_space_tag_t t, bus_space_handle_t bsh,	\
650277460Sian	    bus_size_t offset, uint32_t value, bus_size_t count);
651129198Scognet
652129198Scognet#define	bs_sm_8_proto(f)						\
653277460Sianvoid	__bs_c(f,_bs_sm_8) (bus_space_tag_t t, bus_space_handle_t bsh,	\
654277460Sian	    bus_size_t offset, uint64_t value, bus_size_t count);
655129198Scognet
656129198Scognet#define	bs_sr_1_proto(f)						\
657277460Sianvoid	__bs_c(f,_bs_sr_1) (bus_space_tag_t t, bus_space_handle_t bsh,	\
658277460Sian	    bus_size_t offset, uint8_t value, bus_size_t count);
659129198Scognet
660129198Scognet#define	bs_sr_2_proto(f)						\
661277460Sianvoid	__bs_c(f,_bs_sr_2) (bus_space_tag_t t, bus_space_handle_t bsh,	\
662277460Sian	    bus_size_t offset, uint16_t value, bus_size_t count);
663129198Scognet
664129198Scognet#define	bs_sr_4_proto(f)						\
665277460Sianvoid	__bs_c(f,_bs_sr_4) (bus_space_tag_t t, bus_space_handle_t bsh,	\
666277460Sian	    bus_size_t offset, uint32_t value, bus_size_t count);
667129198Scognet
668129198Scognet#define	bs_sr_8_proto(f)						\
669277460Sianvoid	__bs_c(f,_bs_sr_8) (bus_space_tag_t t, bus_space_handle_t bsh,	\
670277460Sian	    bus_size_t offset, uint64_t value, bus_size_t count);
671129198Scognet
672129198Scognet#define	bs_c_1_proto(f)							\
673277460Sianvoid	__bs_c(f,_bs_c_1) (bus_space_tag_t t, bus_space_handle_t bsh1,	\
674129198Scognet	    bus_size_t offset1, bus_space_handle_t bsh2,		\
675129198Scognet	    bus_size_t offset2, bus_size_t count);
676129198Scognet
677129198Scognet#define	bs_c_2_proto(f)							\
678277460Sianvoid	__bs_c(f,_bs_c_2) (bus_space_tag_t t, bus_space_handle_t bsh1,	\
679129198Scognet	    bus_size_t offset1, bus_space_handle_t bsh2,		\
680129198Scognet	    bus_size_t offset2, bus_size_t count);
681129198Scognet
682129198Scognet#define	bs_c_4_proto(f)							\
683277460Sianvoid	__bs_c(f,_bs_c_4) (bus_space_tag_t t, bus_space_handle_t bsh1,	\
684129198Scognet	    bus_size_t offset1, bus_space_handle_t bsh2,		\
685129198Scognet	    bus_size_t offset2, bus_size_t count);
686129198Scognet
687129198Scognet#define	bs_c_8_proto(f)							\
688277460Sianvoid	__bs_c(f,_bs_c_8) (bus_space_tag_t t, bus_space_handle_t bsh1,	\
689129198Scognet	    bus_size_t offset1, bus_space_handle_t bsh2,		\
690129198Scognet	    bus_size_t offset2, bus_size_t count);
691129198Scognet
692129198Scognet#define bs_protos(f)		\
693129198Scognetbs_map_proto(f);		\
694129198Scognetbs_unmap_proto(f);		\
695129198Scognetbs_subregion_proto(f);		\
696129198Scognetbs_alloc_proto(f);		\
697129198Scognetbs_free_proto(f);		\
698129198Scognetbs_mmap_proto(f);		\
699129198Scognetbs_barrier_proto(f);		\
700129198Scognetbs_r_1_proto(f);		\
701129198Scognetbs_r_2_proto(f);		\
702129198Scognetbs_r_4_proto(f);		\
703129198Scognetbs_r_8_proto(f);		\
704164424Ssambs_r_1_s_proto(f);		\
705164424Ssambs_r_2_s_proto(f);		\
706164424Ssambs_r_4_s_proto(f);		\
707129198Scognetbs_w_1_proto(f);		\
708129198Scognetbs_w_2_proto(f);		\
709129198Scognetbs_w_4_proto(f);		\
710129198Scognetbs_w_8_proto(f);		\
711164424Ssambs_w_1_s_proto(f);		\
712164424Ssambs_w_2_s_proto(f);		\
713164424Ssambs_w_4_s_proto(f);		\
714129198Scognetbs_rm_1_proto(f);		\
715129198Scognetbs_rm_2_proto(f);		\
716129198Scognetbs_rm_4_proto(f);		\
717129198Scognetbs_rm_8_proto(f);		\
718129198Scognetbs_wm_1_proto(f);		\
719129198Scognetbs_wm_2_proto(f);		\
720129198Scognetbs_wm_4_proto(f);		\
721129198Scognetbs_wm_8_proto(f);		\
722129198Scognetbs_rr_1_proto(f);		\
723129198Scognetbs_rr_2_proto(f);		\
724129198Scognetbs_rr_4_proto(f);		\
725129198Scognetbs_rr_8_proto(f);		\
726129198Scognetbs_wr_1_proto(f);		\
727129198Scognetbs_wr_2_proto(f);		\
728129198Scognetbs_wr_4_proto(f);		\
729129198Scognetbs_wr_8_proto(f);		\
730129198Scognetbs_sm_1_proto(f);		\
731129198Scognetbs_sm_2_proto(f);		\
732129198Scognetbs_sm_4_proto(f);		\
733129198Scognetbs_sm_8_proto(f);		\
734129198Scognetbs_sr_1_proto(f);		\
735129198Scognetbs_sr_2_proto(f);		\
736129198Scognetbs_sr_4_proto(f);		\
737129198Scognetbs_sr_8_proto(f);		\
738129198Scognetbs_c_1_proto(f);		\
739129198Scognetbs_c_2_proto(f);		\
740129198Scognetbs_c_4_proto(f);		\
741129198Scognetbs_c_8_proto(f);
742129198Scognet
743277470Sianvoid generic_bs_unimplemented(void);
744277470Sian#define	BS_UNIMPLEMENTED	(void *)generic_bs_unimplemented
745277470Sian
746129198Scognet#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
747129198Scognet
748135645