From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Harvey Harrison <harvey.harrison@gmail.com>
Subject: Re: powerpc: introduce asm/swab.h
Date: Wed, 07 Jan 2009 16:02:32 +1100 [thread overview]
Message-ID: <1231304552.14860.72.camel@pasglop> (raw)
In-Reply-To: <1231303340.14860.61.camel@pasglop>
On Wed, 2009-01-07 at 15:42 +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2009-01-07 at 04:00 +0000, Linux Kernel Mailing List wrote:
> > Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=156ca2bbf6503a02d7d6829886ce381d572de66e
> > Commit: 156ca2bbf6503a02d7d6829886ce381d572de66e
> > Parent: 8cdd3a9261e8efe36aeb6c708edb76d7e2b5d13f
> > Author: Harvey Harrison <harvey.harrison@gmail.com>
> > AuthorDate: Tue Jan 6 14:56:23 2009 -0800
> > Committer: Linus Torvalds <torvalds@linux-foundation.org>
> > CommitDate: Tue Jan 6 18:10:27 2009 -0800
> >
> > powerpc: introduce asm/swab.h
> >
> > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
>
> Was this tested ? I see no arch maintainer signed-off here, it appears
> to at least break ppc32, and contains hunks that paulus says were
> explicitely nacked (removing of our ld_* macros) etc...
>
> Linus, please revert.
More details:
include/linux/swab.h: In function ‘__fswab64’:
include/linux/swab.h:71: error: implicit declaration of function ‘___swab32’
make[1]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
I don't see any place where ___swab32() is defined (with 3 underscores).
Even if fixing that to use __swab32() instead, then it fails because
this is defined after it's used. I worked around it using fswab in
there instead.
This tentative patches fixes that too, but I haven't followed the whole
discussion closely, so I can't tell whether it's fully in the original
intend. In any case, it makes ppc32 build again (and probably others).
byteorder: Fix a couple of bugs in the new include/linux/swab.h
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
diff --git a/include/linux/swab.h b/include/linux/swab.h
index 9a2d33e..351c456 100644
--- a/include/linux/swab.h
+++ b/include/linux/swab.h
@@ -40,7 +40,7 @@
/*
* Implement the following as inlines, but define the interface using
* macros to allow constant folding when possible:
- * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32
+ * __swab16, __swab32, __swab64, __swahw32, __swahb32
*/
static inline __attribute_const__ __u16 __fswab16(__u16 val)
@@ -68,7 +68,7 @@ static inline __attribute_const__ __u64 __fswab64(__u64 val)
#elif defined(__SWAB_64_THRU_32__)
__u32 h = val >> 32;
__u32 l = val & ((1ULL << 32) - 1);
- return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h)));
+ return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));
#else
return ___constant_swab64(val);
#endif
next prev parent reply other threads:[~2009-01-07 5:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200901070400.n0740Ore002063@hera.kernel.org>
2009-01-07 4:42 ` powerpc: introduce asm/swab.h Benjamin Herrenschmidt
2009-01-07 4:48 ` Harvey Harrison
2009-01-07 4:59 ` Nicolas Pitre
2009-01-07 5:08 ` Linus Torvalds
2009-01-07 5:12 ` Nicolas Pitre
2009-01-07 5:01 ` Linus Torvalds
2009-01-07 5:08 ` Nicolas Pitre
2009-01-07 5:02 ` Benjamin Herrenschmidt [this message]
2009-01-07 5:11 ` Linus Torvalds
2009-01-07 5:19 ` Nicolas Pitre
2009-01-07 5:26 ` Nicolas Pitre
2009-01-07 5:38 ` Linus Torvalds
2009-01-07 5:37 ` Linus Torvalds
2009-01-07 6:02 ` Harvey Harrison
2009-01-07 6:05 ` Benjamin Herrenschmidt
2009-01-07 5:39 ` Steven Rostedt
2009-01-07 5:43 ` Benjamin Herrenschmidt
2009-01-07 8:37 ` Geert Uytterhoeven
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=1231304552.14860.72.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=harvey.harrison@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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.