All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] byte swapping redux
@ 2003-06-29 18:14 Grant Grundler
  2003-06-29 18:33 ` Grant Grundler
  2003-06-29 18:41 ` Matthew Wilcox
  0 siblings, 2 replies; 11+ messages in thread
From: Grant Grundler @ 2003-06-29 18:14 UTC (permalink / raw)
  To: parisc-linux

Hi all,

Can someone explain why include/asm-parisc/byteorder.h uses the following?

#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
#  define __BYTEORDER_HAS_U64__
#  define __SWAB_64_THRU_32__
#endif

vs include/asm-sparc64/byeorder.h:
#define __BYTEORDER_HAS_U64__

I'm pretty sure we don't want __SWAB_64_THRU_32__ defined.
PA-RISC version of ___arch__swab64() is appropriately defined for
both 32 and 64-bit compiles.

For reference include/linux/byteorder/swab.h says:
#ifdef __BYTEORDER_HAS_U64__
static __inline__ __const__ __u64 __fswab64(__u64 x)
{
#  ifdef __SWAB_64_THRU_32__
        __u32 h = x >> 32;
        __u32 l = x & ((1ULL<<32)-1);
        return (((__u64)__swab32(l)) << 32) |
		((__u64)(__swab32(h)));
#  else
        return __arch__swab64(x);
#  endif
}
...

thanks,
grant

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-07-02 15:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3ED70CF10000BCAA@ocpmta2.freegates.net>
2003-06-30 16:36 ` [parisc-linux] byte swapping redux Grant Grundler
2003-07-01 16:33   ` Joel Soete
2003-07-01 18:13     ` Grant Grundler
2003-07-02 15:10       ` Joel Soete
2003-06-29 18:14 Grant Grundler
2003-06-29 18:33 ` Grant Grundler
2003-06-29 18:41 ` Matthew Wilcox
2003-06-29 21:33   ` Grant Grundler
2003-06-30 10:19     ` Joel Soete
2003-06-30 16:39       ` Grant Grundler
2003-07-01  7:29         ` Joel Soete

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.