Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 15:02:45 -0600
From:      Warner Losh <imp@harmony.village.org>
To:        Mike Smith <msmith@FreeBSD.ORG>
Cc:        Yar Tikhiy <yar@FreeBSD.ORG>, hackers@FreeBSD.ORG, msmith@mass.dis.org
Subject:   Re: Driver structures & alignment 
Message-ID:  <200109142102.f8EL2jt24452@harmony.village.org>
In-Reply-To: Your message of "Thu, 13 Sep 2001 16:09:57 PDT." <200109132309.f8DN9vX03967@mass.dis.org> 
References:  <200109132309.f8DN9vX03967@mass.dis.org>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200109132309.f8DN9vX03967@mass.dis.org> Mike Smith writes:
: Any form of packing is going to cause problems for items that are
: located in illegal fashions. 

It is almost more appropriate to use bus_space_{read,write} than using
memory mapped structures.  The bus macros will work for otherwise
unaligned thigns, while direct access won't.  Also, the
compiler/system may optimize things in strange ways that cause
problems.  Do yourself a big favor and don't go down this path.

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109142102.f8EL2jt24452>