All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Stewart Smith <stewart@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, anton@samba.org,
	nfont@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
	Greg Kurz <gkurz@linux.vnet.ibm.com>
Subject: Re: [PATCH] powerpc/le: enable RTAS events support
Date: Mon, 31 Mar 2014 22:56:13 +1100	[thread overview]
Message-ID: <1396266973.11529.77.camel@pasglop> (raw)
In-Reply-To: <87vbuv9vaz.fsf@river.i-did-not-set--mail-host-address--so-tickle-me>

On Mon, 2014-03-31 at 09:27 +1100, Stewart Smith wrote:
> Greg Kurz <gkurz@linux.vnet.ibm.com> writes:
> >  struct rtas_error_log {
> > +#ifdef __BIG_ENDIAN__
> > +	/* Byte 0 */
> >  	unsigned long version:8;		/* Architectural version */
> > +	/* Byte 1 */
> 
> I think it would be great if we got rid of the usage of bitfields. As
> soon as the mood of the compiler changes, this code is going to break.

 ... as would a whole pile of kernel code including filesystems :)

Now, don't get me wrong, I hate bitfields as much as you do for the same
reasons. However (unfortunately ?) we've somewhat painted ourselves into
a corner here in kernel-land and I suspect gcc would have a very hard
time changing the format considering how many people did just the same
we did.

Now if we were a userspace program, I would still insist on fixing it on
the ground on not depending on gcc but this is the kernel ... we have
more gcc'isms than spots on the face of a 14 yrs old..

Cheers,
Ben.

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Stewart Smith <stewart@linux.vnet.ibm.com>
Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, paulus@samba.org, anton@samba.org,
	nfont@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/le: enable RTAS events support
Date: Mon, 31 Mar 2014 22:56:13 +1100	[thread overview]
Message-ID: <1396266973.11529.77.camel@pasglop> (raw)
In-Reply-To: <87vbuv9vaz.fsf@river.i-did-not-set--mail-host-address--so-tickle-me>

On Mon, 2014-03-31 at 09:27 +1100, Stewart Smith wrote:
> Greg Kurz <gkurz@linux.vnet.ibm.com> writes:
> >  struct rtas_error_log {
> > +#ifdef __BIG_ENDIAN__
> > +	/* Byte 0 */
> >  	unsigned long version:8;		/* Architectural version */
> > +	/* Byte 1 */
> 
> I think it would be great if we got rid of the usage of bitfields. As
> soon as the mood of the compiler changes, this code is going to break.

 ... as would a whole pile of kernel code including filesystems :)

Now, don't get me wrong, I hate bitfields as much as you do for the same
reasons. However (unfortunately ?) we've somewhat painted ourselves into
a corner here in kernel-land and I suspect gcc would have a very hard
time changing the format considering how many people did just the same
we did.

Now if we were a userspace program, I would still insist on fixing it on
the ground on not depending on gcc but this is the kernel ... we have
more gcc'isms than spots on the face of a 14 yrs old..

Cheers,
Ben.



  parent reply	other threads:[~2014-03-31 11:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  7:33 [PATCH] powerpc/le: enable RTAS events support Greg Kurz
2014-03-28  7:33 ` Greg Kurz
2014-03-28  8:29 ` Laurent Dufour
2014-03-28  8:29   ` Laurent Dufour
2014-03-28  8:36   ` Greg Kurz
2014-03-28  8:36     ` Greg Kurz
2014-03-28 14:57 ` Nathan Fontenot
2014-03-28 14:57   ` Nathan Fontenot
2014-03-28 15:31   ` Greg Kurz
2014-03-28 15:31     ` Greg Kurz
2014-03-30 22:27 ` Stewart Smith
2014-03-30 22:27   ` Stewart Smith
2014-03-31  8:47   ` Greg Kurz
2014-03-31  8:47     ` Greg Kurz
2014-03-31 22:15     ` Stewart Smith
2014-03-31 22:15       ` Stewart Smith
2014-03-31 11:56   ` Benjamin Herrenschmidt [this message]
2014-03-31 11:56     ` Benjamin Herrenschmidt
2014-03-31 22:49     ` Stewart Smith
2014-03-31 22:49       ` Stewart Smith
2014-03-31 15:02 ` [RFC PATCH] " Nathan Fontenot
2014-03-31 15:02   ` Nathan Fontenot
2014-04-01 10:26   ` Geert Uytterhoeven
2014-04-01 10:26     ` Geert Uytterhoeven
2014-04-02 15:56     ` Greg Kurz
2014-04-02 15:56       ` Greg Kurz

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=1396266973.11529.77.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=anton@samba.org \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=stewart@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.