public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: viro@parcelfarce.linux.theplanet.co.uk,
	Dave Jones <davej@redhat.com>, Santiago Leon <santil@us.ibm.com>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH][2.6] IBM PowerPC Virtual Ethernet Driver
Date: Wed, 18 Feb 2004 16:03:28 +1100	[thread overview]
Message-ID: <1077080607.1078.109.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.58.0402172044321.2686@home.osdl.org>


> There's a difference between "the standard doesn't guarantee anything" and 
> "the implementation makes no sense". 
> 
> (Sadly, a lot of compiler people do seem to look to standards more than
> actual users for guides to do things, but at the same time I do believe
> that gcc has useful semantics for bitfields and hardware accesses. You
> just have to know what the implementation-specific rules are)

Well... I still think it's asking for trouble in the long term
to rely on them .... It's definitely broken for drivers of devices
that can be used on different archs (PCI cards for example) since
the layout of the bitfields is different at least with gcc between
big and little endian machines. But I've also been bitten by
alignement issues within the bitfield in the past (not with gcc
though) and other funny things like that...

So overall, I just recommend to get rid of them.


Ben.



  reply	other threads:[~2004-02-18  5:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-17 22:48 [PATCH][2.6] IBM PowerPC Virtual Ethernet Driver Santiago Leon
2004-02-18  0:45 ` Benjamin Herrenschmidt
2004-02-18  4:01   ` Dave Jones
2004-02-18  4:23     ` viro
2004-02-18  4:46       ` Linus Torvalds
2004-02-18  5:03         ` Benjamin Herrenschmidt [this message]
2004-02-18 16:39           ` Linus Torvalds
2004-02-18  5:04         ` viro
2004-02-18  4:19   ` Keith Owens
2004-02-18  4:42     ` Andrew Morton
2004-02-18  4:48     ` Linus Torvalds
2004-02-20 23:26   ` Santiago Leon
2004-02-22 22:11 ` Pavel Machek
2004-02-26  5:52 ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1077080607.1078.109.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=davej@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santil@us.ibm.com \
    --cc=torvalds@osdl.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox