Re: powerpc: introduce asm/swab.h

From: Linus Torvalds
Date: Wed Jan 07 2009 - 00:38:21 EST




On Wed, 7 Jan 2009, Nicolas Pitre wrote:

> On Tue, 6 Jan 2009, Linus Torvalds wrote:
> > On Wed, 7 Jan 2009, Benjamin Herrenschmidt wrote:
> >
> > Can you also verify that it works for you (not just compiles), just so
> > that I can commit it?
>
> Tested OK on ARM (using LE mode with networking, etc.)

Ok, I committed it as a quick-fix. I'm not sure that is necessarily the
final one, but at least it is better than not compiling.

For example, it's kind of silly to use two __fswab32()'s with other
oddness if that one just falls back on __constant_swab32: maybe we'd want
to make sure that we'd use ___constant_swab64() in that case, and only do
the whole __SWAB_64_THRU_32__ if we really have a __arch_swab32()
function.

Of course, I do hope that anybody who #defines __SWAB_64_THRU_32__ already
has that __arch_swab32() thing, so it's likely fine.

I also wonder whether gcc generates better code with a union than with
that 64-bit math...

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/