diff options
author | Ed L. Cashin <ecashin@coraid.com> | 2005-09-19 19:57:36 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-19 19:57:36 -0700 |
commit | e0487992ce1dd7ae7da9c6aabdb19570bb95432b (patch) | |
tree | a2d748df1ae99d8f9e6c8e6055e9ef9a3153d1cf /include/linux/byteorder | |
parent | ff171d8f66a7fe1a000e610e9de11224749f9a22 (diff) | |
download | blackbird-op-linux-e0487992ce1dd7ae7da9c6aabdb19570bb95432b.tar.gz blackbird-op-linux-e0487992ce1dd7ae7da9c6aabdb19570bb95432b.zip |
[BYTEORDER]: Document alignment and byteorder macros
This patch comments the fact that although passing le64_to_cpup et
al. is within the intended use of the byteorder macros, using
get_unaligned is the recommended way to go.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/byteorder')
-rw-r--r-- | include/linux/byteorder/generic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 5fde6f4d6c1e..04bd756efc67 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h @@ -5,6 +5,10 @@ * linux/byteorder_generic.h * Generic Byte-reordering support * + * The "... p" macros, like le64_to_cpup, can be used with pointers + * to unaligned data, but there will be a performance penalty on + * some architectures. Use get_unaligned for unaligned data. + * * Francois-Rene Rideau <fare@tunes.org> 19970707 * gathered all the good ideas from all asm-foo/byteorder.h into one file, * cleaned them up. |