All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Piet Delaney <piet.delaney@tensilica.com>
Cc: Chris Zankel <chris@zankel.net>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Marc Gauthier <marc@tensilica.com>,
	Joe Taylor <joetayloremail@gmail.com>,
	linux-xtensa@linux-xtensa.org,
	Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH 10/10] xtensa: use the new byteorder headers - Merged with your previous xtensa-next and will remerge shortly.
Date: Fri, 14 Nov 2008 08:33:45 -0800	[thread overview]
Message-ID: <1226680425.5483.9.camel@brick> (raw)
In-Reply-To: <491D3338.80405@tensilica.com>

On Fri, 2008-11-14 at 00:13 -0800, Piet Delaney wrote:
> Piet Delaney wrote:
> > Harvey Harrison wrote:
> >> On Fri, 2008-11-07 at 19:00 -0800, Piet Delaney wrote:
> >>> Hi Chris:
> >>>
> >>>    I've merged your recent xtensa-next with our 2.6.24-smp repo.
> >>> It seems to work fine and I'm in the process of cleaning it
> >>> up a bit and adding preliminary XTENSA kgdb support.
> >>
> >> 2.6.24?  In that case you probably don't have include/linux/byteorder.h,
> >> or include/linux/swab.h which would explain your byteorder problems.
> >>
> >> Or is that a typo in the version numbers?
> > 
> > I was on 2.6.24 and didn't have a problem compiling the kernel -O0 other
> > than a minor tweak in slab.c. Now in 2.6.27-rc3 I get a compile problem
> > with rpcb_clnt.c at lines 122, 123, and 129:
> > 
> >    /export/src/xtensa-next/net/sunrpc/rpcb_clnt.c:129: error: (near 
> > initialization for 'rpcb_in6addr_loopback.sin6_port')
> > 
> 
> The problem is fixed by changing htons() to __constant_htons().
> The __constant_*() flavors use a #define and always compile
> to a constant. Ex:
> 
> #define ___constant_swab32(x) \
>          ((__u32)( \
>                  (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
>                  (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) | \
>                  (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) | \
>                  (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
> 
> I tried compiling the recent snapshot from Linus's tree and it
> has a new instance of the problem in a common network file.
> 
> In this case the recent change was FROM __constant_htons()
> to htons(). See net/core/dev.c`simple_tx_hash():

I find it strange that the net/core/dev.c bits of this commit were
a problem as they were only changing the use inside the case: statements
which had to be constants in the first place and had better be picked
up by the __builtin_constant_p inside swab32().

I believe you said you were compiling at -O0?  What compiler?

Harvey


      reply	other threads:[~2008-11-14 16:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05 18:35 [PATCH 10/10] xtensa: use the new byteorder headers Harvey Harrison
2008-11-06 17:59 ` Chris Zankel
2008-11-08  3:00   ` [PATCH 10/10] xtensa: use the new byteorder headers - Merged with your previous xtensa-next and will remerge shortly Piet Delaney
2008-11-08  3:38     ` Harvey Harrison
2008-11-09  3:55       ` Piet Delaney
2008-11-14  8:13         ` Piet Delaney
2008-11-14 16:33           ` Harvey Harrison [this message]

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=1226680425.5483.9.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@zankel.net \
    --cc=chuck.lever@oracle.com \
    --cc=joetayloremail@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=marc@tensilica.com \
    --cc=piet.delaney@tensilica.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.