linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 00/10] tools: Revamp the unaligned endian access functions
@ 2014-06-10 23:13 H. Peter Anvin
  2014-06-10 23:13 ` H. Peter Anvin
                   ` (11 more replies)
  0 siblings, 12 replies; 33+ messages in thread
From: H. Peter Anvin @ 2014-06-10 23:13 UTC (permalink / raw)
  To: Sam Ravnborg, linux-kernel, linux-kbuild, linux-arch
  Cc: Andy Lutomirski, Andrew Morton, Ingo Molnar, Thomas Gleixner,
	H. Peter Anvin

After a recent problem in the x86 tree, which seems to be the heaviest
but not the only user of these functions, I went through and did a
patchset to revamp the *user space* unaligned/endian accessor
functions.  As much as I think it is downright pathetic that this
functionality still isn't part of the C standard, that is life and we
have to deal with it.  Furthermore, although glibc has a pretty nice
set of functions for byte swapping in <endian.h>, taken from FreeBSD I
believe, some older systems don't support them.

This variant tries to fill in all the holes.  It assumes that
<endian.h> define the functions as macros if they exist, as I don't
know any other way of probing for them without reaching for autoconf,
but that should be valid enough of an assumption in this case.

The hope is that this should give reasonable, if not optimal, code
generation on most processors, and give a hook where arch maintainers
can add their own changes if needed.

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

end of thread, other threads:[~2014-06-13 20:04 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 23:13 [PATCH RFC 00/10] tools: Revamp the unaligned endian access functions H. Peter Anvin
2014-06-10 23:13 ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 01/10] tools: Remove double-underscore symbols from user space byteshift functions H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 02/10] tools: Create <tools/unaligned.h> and an unaligned subdirectory H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 03/10] tools: Add le_direct/be_direct methods for unaligned access H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:25   ` Andy Lutomirski
2014-06-10 23:30     ` H. Peter Anvin
2014-06-10 23:30       ` H. Peter Anvin
2014-06-10 23:33       ` Andy Lutomirski
2014-06-10 23:33         ` Andy Lutomirski
2014-06-10 23:41         ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 04/10] tools: Add packed struct method for unaligned references H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 05/10] tools: Add <endian.h> libc support " H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 06/10] tools: Add gcc __builtin_bswap*() " H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 07/10] tools: Remove leading underscores from header guards H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 08/10] tools: Move unaligned common infrastructure into <tools/unaligned.h> H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 09/10] tools: Add common infrastructure for byte swapping H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-10 23:13 ` [PATCH RFC 10/10] tools: Use reasonable defaults for the default access H. Peter Anvin
2014-06-10 23:13   ` H. Peter Anvin
2014-06-11 19:21 ` [PATCH RFC 00/10] tools: Revamp the unaligned endian access functions Sam Ravnborg
2014-06-11 19:21   ` Sam Ravnborg
2014-06-11 21:52   ` H. Peter Anvin
2014-06-11 21:52     ` H. Peter Anvin
2014-06-13 20:04     ` Sam Ravnborg
2014-06-13 20:04       ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).