>#if AH_BYTE_ORDER == AH_BIG_ENDIAN
>#define _OS_REG_WRITE(_ah, _reg, _val) do { \
> if ( (_reg) >= 0x4000 && (_reg) < 0x5000) \
> *((volatile u_int32_t *)((_ah)->ah_sh + (_reg))) = \
> __bswap32((_val)); \
> else \
> *((volatile u_int32_t *)((_ah)->ah_sh + (_reg))) = (_val); \
>} while (0)
>#define _OS_REG_READ(_ah, _reg) \
> (((_reg) >= 0x4000 && (_reg) < 0x5000) ? \
> __bswap32(*((volatile u_int32_t *)((_ah)->ah_sh + (_reg)))) : \
> *((volatile u_int32_t *)((_ah)->ah_sh + (_reg))))
>#else /* AH_LITTLE_ENDIAN */
>[...]
>
>It seems to me that this code should use ddi_get32/ddi_put32 on Solaris,
>but (having never done any driver programming on Solaris), I haven't
>investigated much further yet. I had planned to use dtrace to figure out
>with empty implementations of those functions how they are used on
>Solaris/SPARC.
It would appear so, but that does require a little endian mapping to
be established.
Jeez, is Linux so broken you need to do your own byteswapping for register
accesses?
Casper