svn commit: r216143 - in head: share/man/man9 sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/pc98/include sys/powerpc/include sys/sparc64/include sys/sun4v...

Bruce Cran brucec at FreeBSD.org
Fri Dec 3 07:09:23 UTC 2010


Author: brucec
Date: Fri Dec  3 07:09:23 2010
New Revision: 216143
URL: http://svn.freebsd.org/changeset/base/216143

Log:
  Revert r216134. This checkin broke platforms where bus_space are macros:
  they need to be a single statement, and do { } while (0) doesn't work in this
  situation so revert until a solution can be devised.

Modified:
  head/share/man/man9/bus_space.9
  head/sys/amd64/include/bus.h
  head/sys/arm/include/bus.h
  head/sys/i386/include/bus.h
  head/sys/ia64/include/bus.h
  head/sys/mips/include/bus.h
  head/sys/pc98/include/bus.h
  head/sys/powerpc/include/bus.h
  head/sys/sparc64/include/bus.h
  head/sys/sun4v/include/bus.h

Modified: head/share/man/man9/bus_space.9
==============================================================================
--- head/share/man/man9/bus_space.9	Fri Dec  3 07:01:07 2010	(r216142)
+++ head/share/man/man9/bus_space.9	Fri Dec  3 07:09:23 2010	(r216143)
@@ -719,9 +719,6 @@ or which return data read from bus space
 do not obviously return an error code) do not fail.
 They could only fail
 if given invalid arguments, and in that case their behaviour is undefined.
-Functions which take a count of bytes must not pass in a count of zero; 
-doing so will cause a panic if the kernel was compiled with 
-.Cd "options INVARIANTS" .
 .Sh TYPES
 Several types are defined in
 .In machine/bus.h

Modified: head/sys/amd64/include/bus.h
==============================================================================
--- head/sys/amd64/include/bus.h	Fri Dec  3 07:01:07 2010	(r216142)
+++ head/sys/amd64/include/bus.h	Fri Dec  3 07:09:23 2010	(r216143)
@@ -104,9 +104,6 @@
 #ifndef _AMD64_BUS_H_
 #define _AMD64_BUS_H_
 
-#include <sys/param.h>
-#include <sys/systm.h>
-
 #include <machine/_bus.h>
 #include <machine/cpufunc.h>
 
@@ -271,7 +268,7 @@ static __inline void
 bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO)
 		insb(bsh + offset, addr, count);
 	else {
@@ -292,7 +289,7 @@ static __inline void
 bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO)
 		insw(bsh + offset, addr, count);
 	else {
@@ -313,7 +310,7 @@ static __inline void
 bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO)
 		insl(bsh + offset, addr, count);
 	else {
@@ -359,7 +356,7 @@ static __inline void
 bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -391,7 +388,7 @@ static __inline void
 bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -423,7 +420,7 @@ static __inline void
 bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -535,7 +532,7 @@ static __inline void
 bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, const u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO)
 		outsb(bsh + offset, addr, count);
 	else {
@@ -556,7 +553,7 @@ static __inline void
 bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, const u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO)
 		outsw(bsh + offset, addr, count);
 	else {
@@ -577,7 +574,7 @@ static __inline void
 bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, const u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO)
 		outsl(bsh + offset, addr, count);
 	else {
@@ -624,7 +621,7 @@ static __inline void
 bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 			 bus_size_t offset, const u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -656,7 +653,7 @@ static __inline void
 bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 			 bus_size_t offset, const u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -688,7 +685,7 @@ static __inline void
 bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 			 bus_size_t offset, const u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == AMD64_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -880,7 +877,6 @@ bus_space_copy_region_1(bus_space_tag_t 
 	bus_space_handle_t addr1 = bsh1 + off1;
 	bus_space_handle_t addr2 = bsh2 + off2;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == AMD64_BUS_SPACE_IO) {
 		if (addr1 >= addr2) {
 			/* src after dest: copy forward */
@@ -916,7 +912,6 @@ bus_space_copy_region_2(bus_space_tag_t 
 	bus_space_handle_t addr1 = bsh1 + off1;
 	bus_space_handle_t addr2 = bsh2 + off2;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == AMD64_BUS_SPACE_IO) {
 		if (addr1 >= addr2) {
 			/* src after dest: copy forward */
@@ -952,7 +947,6 @@ bus_space_copy_region_4(bus_space_tag_t 
 	bus_space_handle_t addr1 = bsh1 + off1;
 	bus_space_handle_t addr2 = bsh2 + off2;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == AMD64_BUS_SPACE_IO) {
 		if (addr1 >= addr2) {
 			/* src after dest: copy forward */

Modified: head/sys/arm/include/bus.h
==============================================================================
--- head/sys/arm/include/bus.h	Fri Dec  3 07:01:07 2010	(r216142)
+++ head/sys/arm/include/bus.h	Fri Dec  3 07:09:23 2010	(r216143)
@@ -66,9 +66,6 @@
 #ifndef _MACHINE_BUS_H_
 #define _MACHINE_BUS_H_
 
-#include <sys/param.h>
-#include <sys/systm.h>
-
 #include <machine/_bus.h>
 
 /*
@@ -321,29 +318,21 @@ struct bus_space {
  * Bus read multiple operations.
  */
 #define	bus_space_read_multi_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_1: count == 0"));	\
 	__bs_nonsingle(rm,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_2: count == 0"));	\
 	__bs_nonsingle(rm,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_4: count == 0"));	\
 	__bs_nonsingle(rm,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_8: count == 0"));	\
 	__bs_nonsingle(rm,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_read_multi_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_1: count == 0"));	\
 	__bs_nonsingle_s(rm,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_2: count == 0"));	\
 	__bs_nonsingle_s(rm,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_4: count == 0"));	\
 	__bs_nonsingle_s(rm,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_8: count == 0"));	\
 	__bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c))
 
 
@@ -351,29 +340,21 @@ struct bus_space {
  * Bus read region operations.
  */
 #define	bus_space_read_region_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_1: count == 0"));	\
 	__bs_nonsingle(rr,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_2: count == 0"));	\
 	__bs_nonsingle(rr,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_4: count == 0"));	\
 	__bs_nonsingle(rr,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_8: count == 0"));	\
 	__bs_nonsingle(rr,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_read_region_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_region_stream_1: count == 0"));\
 	__bs_nonsingle_s(rr,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_region_stream_2: count == 0"));\
 	__bs_nonsingle_s(rr,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_region_stream_4: count == 0"));\
 	__bs_nonsingle_s(rr,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_region_stream_8 count == 0"));	\
 	__bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c))
 
 
@@ -395,29 +376,21 @@ struct bus_space {
  * Bus write multiple operations.
  */
 #define	bus_space_write_multi_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_1: count == 0"));	\
 	__bs_nonsingle(wm,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_2: count == 0"));	\
 	__bs_nonsingle(wm,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_4: count == 0"));	\
 	__bs_nonsingle(wm,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_8: count == 0"));	\
 	__bs_nonsingle(wm,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_write_multi_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_write_multi_stream_1: count == 0"));\
 	__bs_nonsingle_s(wm,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_write_multi_stream_2: count == 0"));\
 	__bs_nonsingle_s(wm,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_write_multi_stream_4: count == 0"));\
 	__bs_nonsingle_s(wm,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_write_multi_stream_8: count == 0"));\
 	__bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c))
 
 
@@ -425,50 +398,34 @@ struct bus_space {
  * Bus write region operations.
  */
 #define	bus_space_write_region_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_1: count == 0"));	\
 	__bs_nonsingle(wr,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_2: count == 0"));	\
 	__bs_nonsingle(wr,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_4: count == 0"));	\
 	__bs_nonsingle(wr,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_8: count == 0"));	\
 	__bs_nonsingle(wr,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_write_region_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_1: count == 0"));		\
 	__bs_nonsingle_s(wr,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_2: count == 0"));		\
 	__bs_nonsingle_s(wr,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_4: count == 0"));		\
 	__bs_nonsingle_s(wr,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_8: count == 0"));		\
 	__bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c))
 
 
 /*
  * Set multiple operations.
  */
-#define	bus_space_set_multi_1(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_1: count == 0"));	\
+#define	bus_space_set_multi_1(t, h, o, v, c)				\
 	__bs_set(sm,1,(t),(h),(o),(v),(c))
-#define	bus_space_set_multi_2(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_2: count == 0"));	\
+#define	bus_space_set_multi_2(t, h, o, v, c)				\
 	__bs_set(sm,2,(t),(h),(o),(v),(c))
-#define	bus_space_set_multi_4(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_4: count == 0"));	\
+#define	bus_space_set_multi_4(t, h, o, v, c)				\
 	__bs_set(sm,4,(t),(h),(o),(v),(c))
-#define	bus_space_set_multi_8(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_8: count == 0"));	\
+#define	bus_space_set_multi_8(t, h, o, v, c)				\
 	__bs_set(sm,8,(t),(h),(o),(v),(c))
 
 
@@ -476,33 +433,25 @@ struct bus_space {
  * Set region operations.
  */
 #define	bus_space_set_region_1(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_1: count == 0"));	\
 	__bs_set(sr,1,(t),(h),(o),(v),(c))
 #define	bus_space_set_region_2(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_2: count == 0"));	\
 	__bs_set(sr,2,(t),(h),(o),(v),(c))
 #define	bus_space_set_region_4(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_4: count == 0"));	\
 	__bs_set(sr,4,(t),(h),(o),(v),(c))
 #define	bus_space_set_region_8(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_8: count == 0"));	\
 	__bs_set(sr,8,(t),(h),(o),(v),(c))
 
 
 /*
  * Copy operations.
  */
-#define	bus_space_copy_region_1(t, h1, o1, h2, o2, c)			\
-	KASSERT(c != 0, ("bus_space_copy_region_1: count == 0"));	\
+#define	bus_space_copy_region_1(t, h1, o1, h2, o2, c)				\
 	__bs_copy(1, t, h1, o1, h2, o2, c)
-#define	bus_space_copy_region_2(t, h1, o1, h2, o2, c)			\
-	KASSERT(c != 0, ("bus_space_copy_region_2: count == 0"));	\
+#define	bus_space_copy_region_2(t, h1, o1, h2, o2, c)				\
 	__bs_copy(2, t, h1, o1, h2, o2, c)
-#define	bus_space_copy_region_4(t, h1, o1, h2, o2, c)			\
-	KASSERT(c != 0, ("bus_space_copy_region_4: count == 0"));	\
+#define	bus_space_copy_region_4(t, h1, o1, h2, o2, c)				\
 	__bs_copy(4, t, h1, o1, h2, o2, c)
-#define	bus_space_copy_region_8(t, h1, o1, h2, o2, c)			\
-	KASSERT(c != 0, ("bus_space_copy_region_8: count == 0"));	\
+#define	bus_space_copy_region_8(t, h1, o1, h2, o2, c)				\
 	__bs_copy(8, t, h1, o1, h2, o2, c)
 
 /*

Modified: head/sys/i386/include/bus.h
==============================================================================
--- head/sys/i386/include/bus.h	Fri Dec  3 07:01:07 2010	(r216142)
+++ head/sys/i386/include/bus.h	Fri Dec  3 07:09:23 2010	(r216143)
@@ -104,9 +104,6 @@
 #ifndef _I386_BUS_H_
 #define _I386_BUS_H_
 
-#include <sys/param.h>
-#include <sys/systm.h>
-
 #include <machine/_bus.h>
 #include <machine/cpufunc.h>
 
@@ -275,7 +272,7 @@ static __inline void
 bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO)
 		insb(bsh + offset, addr, count);
 	else {
@@ -300,7 +297,7 @@ static __inline void
 bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO)
 		insw(bsh + offset, addr, count);
 	else {
@@ -325,7 +322,7 @@ static __inline void
 bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 		       bus_size_t offset, u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO)
 		insl(bsh + offset, addr, count);
 	else {
@@ -375,7 +372,7 @@ static __inline void
 bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -415,7 +412,7 @@ static __inline void
 bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -455,7 +452,7 @@ static __inline void
 bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -575,7 +572,7 @@ static __inline void
 bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, const u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO)
 		outsb(bsh + offset, addr, count);
 	else {
@@ -600,7 +597,7 @@ static __inline void
 bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, const u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO)
 		outsw(bsh + offset, addr, count);
 	else {
@@ -625,7 +622,7 @@ static __inline void
 bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 			bus_size_t offset, const u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO)
 		outsl(bsh + offset, addr, count);
 	else {
@@ -676,7 +673,7 @@ static __inline void
 bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
 			 bus_size_t offset, const u_int8_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -716,7 +713,7 @@ static __inline void
 bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
 			 bus_size_t offset, const u_int16_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -756,7 +753,7 @@ static __inline void
 bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
 			 bus_size_t offset, const u_int32_t *addr, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (tag == I386_BUS_SPACE_IO) {
 		int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -821,7 +818,6 @@ bus_space_set_multi_1(bus_space_tag_t ta
 {
 	bus_space_handle_t addr = bsh + offset;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO)
 		while (count--)
 			outb(addr, value);
@@ -836,7 +832,6 @@ bus_space_set_multi_2(bus_space_tag_t ta
 {
 	bus_space_handle_t addr = bsh + offset;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO)
 		while (count--)
 			outw(addr, value);
@@ -851,7 +846,6 @@ bus_space_set_multi_4(bus_space_tag_t ta
 {
 	bus_space_handle_t addr = bsh + offset;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO)
 		while (count--)
 			outl(addr, value);
@@ -888,7 +882,6 @@ bus_space_set_region_1(bus_space_tag_t t
 {
 	bus_space_handle_t addr = bsh + offset;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO)
 		for (; count != 0; count--, addr++)
 			outb(addr, value);
@@ -903,7 +896,6 @@ bus_space_set_region_2(bus_space_tag_t t
 {
 	bus_space_handle_t addr = bsh + offset;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO)
 		for (; count != 0; count--, addr += 2)
 			outw(addr, value);
@@ -918,7 +910,6 @@ bus_space_set_region_4(bus_space_tag_t t
 {
 	bus_space_handle_t addr = bsh + offset;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO)
 		for (; count != 0; count--, addr += 4)
 			outl(addr, value);
@@ -962,7 +953,6 @@ bus_space_copy_region_1(bus_space_tag_t 
 	bus_space_handle_t addr1 = bsh1 + off1;
 	bus_space_handle_t addr2 = bsh2 + off2;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO) {
 		if (addr1 >= addr2) {
 			/* src after dest: copy forward */
@@ -998,7 +988,6 @@ bus_space_copy_region_2(bus_space_tag_t 
 	bus_space_handle_t addr1 = bsh1 + off1;
 	bus_space_handle_t addr2 = bsh2 + off2;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO) {
 		if (addr1 >= addr2) {
 			/* src after dest: copy forward */
@@ -1034,7 +1023,6 @@ bus_space_copy_region_4(bus_space_tag_t 
 	bus_space_handle_t addr1 = bsh1 + off1;
 	bus_space_handle_t addr2 = bsh2 + off2;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (tag == I386_BUS_SPACE_IO) {
 		if (addr1 >= addr2) {
 			/* src after dest: copy forward */

Modified: head/sys/ia64/include/bus.h
==============================================================================
--- head/sys/ia64/include/bus.h	Fri Dec  3 07:01:07 2010	(r216142)
+++ head/sys/ia64/include/bus.h	Fri Dec  3 07:09:23 2010	(r216143)
@@ -91,9 +91,6 @@
 #ifndef _MACHINE_BUS_H_
 #define _MACHINE_BUS_H_
 
-#include <sys/param.h>
-#include <sys/systm.h>
-
 #include <machine/_bus.h>
 #include <machine/cpufunc.h>
 
@@ -301,7 +298,7 @@ static __inline void
 bus_space_read_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint8_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_multi_io_1(bsh + ofs, bufp, count);
 	else {
@@ -314,7 +311,7 @@ static __inline void
 bus_space_read_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint16_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_multi_io_2(bsh + ofs, bufp, count);
 	else {
@@ -327,7 +324,7 @@ static __inline void
 bus_space_read_multi_4(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint32_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_multi_io_4(bsh + ofs, bufp, count);
 	else {
@@ -340,7 +337,7 @@ static __inline void
 bus_space_read_multi_8(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint64_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_multi_io_8(bsh + ofs, bufp, count);
 	else {
@@ -364,7 +361,7 @@ static __inline void
 bus_space_write_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint8_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_multi_io_1(bsh + ofs, bufp, count);
 	else {
@@ -377,7 +374,7 @@ static __inline void
 bus_space_write_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint16_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_multi_io_2(bsh + ofs, bufp, count);
 	else {
@@ -390,7 +387,7 @@ static __inline void
 bus_space_write_multi_4(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint32_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_multi_io_4(bsh + ofs, bufp, count);
 	else {
@@ -403,7 +400,7 @@ static __inline void
 bus_space_write_multi_8(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint64_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_multi_io_8(bsh + ofs, bufp, count);
 	else {
@@ -428,7 +425,7 @@ static __inline void
 bus_space_read_region_1(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint8_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_region_io_1(bsh + ofs, bufp, count);
 	else {
@@ -442,7 +439,7 @@ static __inline void
 bus_space_read_region_2(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint16_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_region_io_2(bsh + ofs, bufp, count);
 	else {
@@ -456,7 +453,7 @@ static __inline void
 bus_space_read_region_4(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint32_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_region_io_4(bsh + ofs, bufp, count);
 	else {
@@ -470,7 +467,7 @@ static __inline void
 bus_space_read_region_8(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint64_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_read_region_io_8(bsh + ofs, bufp, count);
 	else {
@@ -496,7 +493,7 @@ static __inline void
 bus_space_write_region_1(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint8_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_region_io_1(bsh + ofs, bufp, count);
 	else {
@@ -510,7 +507,7 @@ static __inline void
 bus_space_write_region_2(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint16_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_region_io_2(bsh + ofs, bufp, count);
 	else {
@@ -524,7 +521,7 @@ static __inline void
 bus_space_write_region_4(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint32_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_region_io_4(bsh + ofs, bufp, count);
 	else {
@@ -538,7 +535,7 @@ static __inline void
 bus_space_write_region_8(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, const uint64_t *bufp, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_write_region_io_8(bsh + ofs, bufp, count);
 	else {
@@ -558,7 +555,7 @@ static __inline void
 bus_space_set_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint8_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	while (count-- > 0)
 		bus_space_write_1(bst, bsh, ofs, val);
 }
@@ -567,7 +564,7 @@ static __inline void
 bus_space_set_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint16_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	while (count-- > 0)
 		bus_space_write_2(bst, bsh, ofs, val);
 }
@@ -576,7 +573,7 @@ static __inline void
 bus_space_set_multi_4(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint32_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	while (count-- > 0)
 		bus_space_write_4(bst, bsh, ofs, val);
 }
@@ -585,7 +582,7 @@ static __inline void
 bus_space_set_multi_8(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint64_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	while (count-- > 0)
 		bus_space_write_8(bst, bsh, ofs, val);
 }
@@ -606,7 +603,7 @@ static __inline void
 bus_space_set_region_1(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint8_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_set_region_io_1(bsh + ofs, val, count);
 	else {
@@ -620,7 +617,7 @@ static __inline void
 bus_space_set_region_2(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint16_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_set_region_io_2(bsh + ofs, val, count);
 	else {
@@ -634,7 +631,7 @@ static __inline void
 bus_space_set_region_4(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint32_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_set_region_io_4(bsh + ofs, val, count);
 	else {
@@ -648,7 +645,7 @@ static __inline void
 bus_space_set_region_8(bus_space_tag_t bst, bus_space_handle_t bsh,
     bus_size_t ofs, uint64_t val, size_t count)
 {
-	KASSERT(count != 0, ("%s: count == 0", __func__));
+
 	if (__predict_false(bst == IA64_BUS_SPACE_IO))
 		bus_space_set_region_io_4(bsh + ofs, val, count);
 	else {
@@ -677,7 +674,6 @@ bus_space_copy_region_1(bus_space_tag_t 
 {
 	uint8_t *dst, *src;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (__predict_false(bst == IA64_BUS_SPACE_IO)) {
 		bus_space_copy_region_io_1(sbsh + sofs, dbsh + dofs, count);
 		return;
@@ -702,7 +698,6 @@ bus_space_copy_region_2(bus_space_tag_t 
 {
 	uint16_t *dst, *src;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (__predict_false(bst == IA64_BUS_SPACE_IO)) {
 		bus_space_copy_region_io_2(sbsh + sofs, dbsh + dofs, count);
 		return;
@@ -727,7 +722,6 @@ bus_space_copy_region_4(bus_space_tag_t 
 {
 	uint32_t *dst, *src;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (__predict_false(bst == IA64_BUS_SPACE_IO)) {
 		bus_space_copy_region_io_4(sbsh + sofs, dbsh + dofs, count);
 		return;
@@ -752,7 +746,6 @@ bus_space_copy_region_8(bus_space_tag_t 
 {
 	uint64_t *dst, *src;
 
-	KASSERT(count != 0, ("%s: count == 0", __func__));
 	if (__predict_false(bst == IA64_BUS_SPACE_IO)) {
 		bus_space_copy_region_io_8(sbsh + sofs, dbsh + dofs, count);
 		return;

Modified: head/sys/mips/include/bus.h
==============================================================================
--- head/sys/mips/include/bus.h	Fri Dec  3 07:01:07 2010	(r216142)
+++ head/sys/mips/include/bus.h	Fri Dec  3 07:09:23 2010	(r216143)
@@ -73,9 +73,6 @@
 #ifndef _MACHINE_BUS_H_
 #define _MACHINE_BUS_H_
 
-#include <sys/param.h>
-#include <sys/systm.h>
-
 #include <machine/_bus.h>
 
 struct bus_space {
@@ -317,29 +314,21 @@ struct bus_space {
  * Bus read multiple operations.
  */
 #define	bus_space_read_multi_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_1: count == 0"));	\
 	__bs_nonsingle(rm,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_2: count == 0"));	\
 	__bs_nonsingle(rm,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_4: count == 0"));	\
 	__bs_nonsingle(rm,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_multi_8: count == 0"));	\
 	__bs_nonsingle(rm,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_read_multi_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_1: count == 0"));	\
 	__bs_nonsingle_s(rm,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_2: count == 0"));	\
 	__bs_nonsingle_s(rm,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_4: count == 0"));	\
 	__bs_nonsingle_s(rm,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_multi_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0, ("bus_space_read_multi_stream_8: count == 0"));	\
 	__bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c))
 
 
@@ -347,33 +336,21 @@ struct bus_space {
  * Bus read region operations.
  */
 #define	bus_space_read_region_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_1: count == 0"));	\
 	__bs_nonsingle(rr,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_2: count == 0"));	\
 	__bs_nonsingle(rr,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_4: count == 0"));	\
 	__bs_nonsingle(rr,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_read_region_8: count == 0"));	\
 	__bs_nonsingle(rr,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_read_region_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_read_region_stream_1: count == 0"));		\
 	__bs_nonsingle_s(rr,1,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_read_region_stream_2: count == 0"));		\
 	__bs_nonsingle_s(rr,2,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_read_region_stream_4: count == 0"));		\
 	__bs_nonsingle_s(rr,4,(t),(h),(o),(a),(c))
 #define	bus_space_read_region_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_read_region_stream_8: count == 0"));		\
 	__bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c))
 
 
@@ -395,33 +372,21 @@ struct bus_space {
  * Bus write multiple operations.
  */
 #define	bus_space_write_multi_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_1: count == 0"));	\
 	__bs_nonsingle(wm,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_2: count == 0"));	\
 	__bs_nonsingle(wm,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_4: count == 0"));	\
 	__bs_nonsingle(wm,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_multi_8: count == 0"));	\
 	__bs_nonsingle(wm,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_write_multi_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_multi_stream_1: count == 0"));		\
 	__bs_nonsingle_s(wm,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_multi_stream_2: count == 0"));		\
 	__bs_nonsingle_s(wm,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_multi_stream_4: count == 0"));		\
 	__bs_nonsingle_s(wm,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_multi_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_multi_stream_8: count == 0"));		\
 	__bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c))
 
 
@@ -429,50 +394,34 @@ struct bus_space {
  * Bus write region operations.
  */
 #define	bus_space_write_region_1(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_1: count == 0"));	\
 	__bs_nonsingle(wr,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_2(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_2: count == 0"));	\
 	__bs_nonsingle(wr,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_4(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_4: count == 0"));	\
 	__bs_nonsingle(wr,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_8(t, h, o, a, c)				\
-	KASSERT(c != 0, ("bus_space_write_region_8: count == 0"));	\
 	__bs_nonsingle(wr,8,(t),(h),(o),(a),(c))
 
 #define	bus_space_write_region_stream_1(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_1: count == 0"));		\
 	__bs_nonsingle_s(wr,1,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_stream_2(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_2: count == 0"));		\
 	__bs_nonsingle_s(wr,2,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_stream_4(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_4: count == 0"));		\
 	__bs_nonsingle_s(wr,4,(t),(h),(o),(a),(c))
 #define	bus_space_write_region_stream_8(t, h, o, a, c)			\
-	KASSERT(c != 0,							\
-	    ("bus_space_write_region_stream_8: count == 0"));		\
 	__bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c))
 
 
 /*
  * Set multiple operations.
  */
-#define	bus_space_set_multi_1(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_1: count == 0"));	\
+#define	bus_space_set_multi_1(t, h, o, v, c)				\
 	__bs_set(sm,1,(t),(h),(o),(v),(c))
-#define	bus_space_set_multi_2(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_2: count == 0"));	\
+#define	bus_space_set_multi_2(t, h, o, v, c)				\
 	__bs_set(sm,2,(t),(h),(o),(v),(c))
-#define	bus_space_set_multi_4(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_4: count == 0"));	\
+#define	bus_space_set_multi_4(t, h, o, v, c)				\
 	__bs_set(sm,4,(t),(h),(o),(v),(c))
-#define	bus_space_set_multi_8(t, h, o, v, c)			\
-	KASSERT(c != 0, ("bus_space_set_multi_8: count == 0"));	\
+#define	bus_space_set_multi_8(t, h, o, v, c)				\
 	__bs_set(sm,8,(t),(h),(o),(v),(c))
 
 
@@ -480,33 +429,25 @@ struct bus_space {
  * Set region operations.
  */
 #define	bus_space_set_region_1(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_1: count == 0"));	\
 	__bs_set(sr,1,(t),(h),(o),(v),(c))
 #define	bus_space_set_region_2(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_2: count == 0"));	\
 	__bs_set(sr,2,(t),(h),(o),(v),(c))
 #define	bus_space_set_region_4(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_4: count == 0"));	\
 	__bs_set(sr,4,(t),(h),(o),(v),(c))
 #define	bus_space_set_region_8(t, h, o, v, c)				\
-	KASSERT(c != 0, ("bus_space_set_region_8: count == 0"));	\
 	__bs_set(sr,8,(t),(h),(o),(v),(c))
 
 
 /*
  * Copy operations.
  */
-#define	bus_space_copy_region_1(t, h1, o1, h2, o2, c)			\
-	KASSERT(c != 0, ("bus_space_copy_region_1: count == 0"));	\
+#define	bus_space_copy_region_1(t, h1, o1, h2, o2, c)				\
 	__bs_copy(1, t, h1, o1, h2, o2, c)
-#define	bus_space_copy_region_2(t, h1, o1, h2, o2, c)			\
-	KASSERT(c != 0, ("bus_space_copy_region_2: count == 0"));	\
+#define	bus_space_copy_region_2(t, h1, o1, h2, o2, c)				\
 	__bs_copy(2, t, h1, o1, h2, o2, c)
-#define	bus_space_copy_region_4(t, h1, o1, h2, o2, c)			\
-	KASSERT(c != 0, ("bus_space_copy_region_4: count == 0"));	\
+#define	bus_space_copy_region_4(t, h1, o1, h2, o2, c)				\
 	__bs_copy(4, t, h1, o1, h2, o2, c)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-head mailing list