From owner-freebsd-hackers Fri Sep 14 14: 4: 9 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id DF18837B40B; Fri, 14 Sep 2001 14:04:02 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f8EL2k622665; Fri, 14 Sep 2001 15:02:46 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.4) with ESMTP id f8EL2jt24452; Fri, 14 Sep 2001 15:02:45 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200109142102.f8EL2jt24452@harmony.village.org> To: Mike Smith Subject: Re: Driver structures & alignment Cc: Yar Tikhiy , hackers@FreeBSD.ORG, msmith@mass.dis.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> Date: Fri, 14 Sep 2001 15:02:45 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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