summaryrefslogtreecommitdiffstats
path: root/sys/pc98/include
diff options
context:
space:
mode:
authorbrucec <brucec@FreeBSD.org>2010-12-03 07:09:23 +0000
committerbrucec <brucec@FreeBSD.org>2010-12-03 07:09:23 +0000
commit6e3faf1602bf6c6c348e207557a56e715392a112 (patch)
tree8bfc5e3c3a033dbc114da53335064960c35404ff /sys/pc98/include
parentde08b1bcf1ecdb8025e89558c87c0f0e800037cc (diff)
downloadFreeBSD-src-6e3faf1602bf6c6c348e207557a56e715392a112.zip
FreeBSD-src-6e3faf1602bf6c6c348e207557a56e715392a112.tar.gz
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.
Diffstat (limited to 'sys/pc98/include')
-rw-r--r--sys/pc98/include/bus.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/pc98/include/bus.h b/sys/pc98/include/bus.h
index a31590e..b12845c 100644
--- a/sys/pc98/include/bus.h
+++ b/sys/pc98/include/bus.h
@@ -78,7 +78,6 @@
#ifndef _PC98_BUS_H_
#define _PC98_BUS_H_
-#include <sys/param.h>
#include <sys/systm.h>
#include <machine/_bus.h>
@@ -379,7 +378,7 @@ bus_space_read_multi_##BWN (tag, bsh, offset, buf, cnt) \
TYPE *buf; \
size_t cnt; \
{ \
- KASSERT(cnt != 0, ("count == 0")); \
+ \
__asm __volatile("call *%3" \
:"=c" (cnt), \
"=d" (offset), \
@@ -408,7 +407,7 @@ bus_space_write_multi_##BWN (tag, bsh, offset, buf, cnt) \
const TYPE *buf; \
size_t cnt; \
{ \
- KASSERT(cnt != 0, ("count == 0")); \
+ \
__asm __volatile("call *%3" \
:"=c" (cnt), \
"=d" (offset), \
@@ -434,10 +433,10 @@ bus_space_read_region_##BWN (tag, bsh, offset, buf, cnt) \
bus_space_tag_t tag; \
bus_space_handle_t bsh; \
bus_size_t offset; \
- TYPE *buf; \
+ TYPE *buf; \
size_t cnt; \
{ \
- KASSERT(cnt != 0, ("count == 0")); \
+ \
__asm __volatile("call *%3" \
:"=c" (cnt), \
"=d" (offset), \
@@ -466,7 +465,7 @@ bus_space_write_region_##BWN (tag, bsh, offset, buf, cnt) \
const TYPE *buf; \
size_t cnt; \
{ \
- KASSERT(cnt != 0, ("count == 0")); \
+ \
__asm __volatile("call *%3" \
:"=c" (cnt), \
"=d" (offset), \
@@ -495,7 +494,7 @@ bus_space_set_multi_##BWN (tag, bsh, offset, val, cnt) \
TYPE val; \
size_t cnt; \
{ \
- KASSERT(cnt != 0, ("count == 0")); \
+ \
__asm __volatile("call *%2" \
:"=c" (cnt), \
"=d" (offset) \
@@ -523,7 +522,7 @@ bus_space_set_region_##BWN (tag, bsh, offset, val, cnt) \
TYPE val; \
size_t cnt; \
{ \
- KASSERT(cnt != 0, ("count == 0")); \
+ \
__asm __volatile("call *%2" \
:"=c" (cnt), \
"=d" (offset) \
@@ -556,7 +555,6 @@ bus_space_copy_region_##BWN (tag, sbsh, src, dbsh, dst, cnt) \
if (dbsh->bsh_bam.bs_copy_region_1 != sbsh->bsh_bam.bs_copy_region_1) \
panic("bus_space_copy_region: funcs mismatch (ENOSUPPORT)");\
\
- KASSERT(cnt != 0, ("count == 0")); \
__asm __volatile("call *%3" \
:"=c" (cnt), \
"=S" (src), \
OpenPOWER on IntegriCloud