diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1997-01-10 23:41:26 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1997-01-10 23:41:26 +0000 |
commit | 75804f42a5d877e0b14957384040c8c8b4fa0265 (patch) | |
tree | 8d198daba19c2a7341c22ee993610622fe9d203c /sys/arch/arc/include | |
parent | 3d03cf7436c68a5bb050fe3619841d085aba1ec4 (diff) |
Use "locore.S" versions of block io operations.
They handle unaligned memory references.
Diffstat (limited to 'sys/arch/arc/include')
-rw-r--r-- | sys/arch/arc/include/bus.h | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/sys/arch/arc/include/bus.h b/sys/arch/arc/include/bus.h index 7b121c8c018..71ce3df4b49 100644 --- a/sys/arch/arc/include/bus.h +++ b/sys/arch/arc/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.8 1996/11/28 23:35:42 niklas Exp $ */ +/* $OpenBSD: bus.h,v 1.9 1997/01/10 23:41:25 pefo Exp $ */ /* * Copyright (c) 1996 Niklas Hallqvist. All rights reserved. @@ -70,18 +70,17 @@ bus_space_read(4,32) #define bus_space_read_8 !!! bus_space_read_8 unimplemented !!! -#define bus_space_read_multi(n, m) \ -static __inline void \ -CAT(bus_space_read_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \ - bus_addr_t ba, CAT3(u_int,m,_t) *buf, bus_size_t cnt) \ -{ \ - while (cnt--) \ - *buf++ = CAT(bus_space_read_,n)(bst, bsh, ba); \ -} +#define bus_space_read_multi_1(t, h, o, a, c) do { \ + insb((h) + (o), (a), (c)); \ + } while(0) -bus_space_read_multi(1,8) -bus_space_read_multi(2,16) -bus_space_read_multi(4,32) +#define bus_space_read_multi_2(t, h, o, a, c) do { \ + insw((h) + (o), (a), (c)); \ + } while(0) + +#define bus_space_read_multi_4(t, h, o, a, c) do { \ + insl((h) + (o), (a), (c)); \ + } while(0) #define bus_space_read_multi_8 !!! bus_space_read_multi_8 not implemented !!! @@ -99,18 +98,18 @@ bus_space_write(4,32) #define bus_space_write_8 !!! bus_space_write_8 unimplemented !!! -#define bus_space_write_multi(n, m) \ -static __inline void \ -CAT(bus_space_write_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \ - bus_addr_t ba, const CAT3(u_int,m,_t) *buf, bus_size_t cnt) \ -{ \ - while (cnt--) \ - CAT(bus_space_write_,n)(bst, bsh, ba, *buf++); \ -} -bus_space_write_multi(1,8) -bus_space_write_multi(2,16) -bus_space_write_multi(4,32) +#define bus_space_write_multi_1(t, h, o, a, c) do { \ + outsb((h) + (o), (a), (c)); \ + } while(0) + +#define bus_space_write_multi_2(t, h, o, a, c) do { \ + outsw((h) + (o), (a), (c)); \ + } while(0) + +#define bus_space_write_multi_4(t, h, o, a, c) do { \ + outsl((h) + (o), (a), (c)); \ + } while(0) #define bus_space_write_multi_8 !!! bus_space_write_multi_8 not implemented !!! |