On Thu, 17 Mar 2005 22:57:25 +0100 (CET)
Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
> On Thu, 17 Mar 2005, David S. Miller wrote:
> > 6) M68K can do unaligned access directly.
>
> Just for the record, this is true for 68020 and later only. I.e. some MMU-less
> variants need unaligned support.
Thanks for the info. I've just added the following diff
on top so that the COLDFIRE build uses the new generic
unaligned header.
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/17 14:02:44-08:00 [EMAIL PROTECTED]
# [M68KNOMMU]: Use asm-generic/unaligned.h for COLDFIRE.
#
# Based upon comments from Geert Uytterhoeven.
#
# Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
#
# include/asm-m68knommu/unaligned.h
# 2005/03/17 14:02:09-08:00 [EMAIL PROTECTED] +1 -9
# [M68KNOMMU]: Use asm-generic/unaligned.h for COLDFIRE.
#
diff -Nru a/include/asm-m68knommu/unaligned.h
b/include/asm-m68knommu/unaligned.h
--- a/include/asm-m68knommu/unaligned.h 2005-03-17 14:03:19 -08:00
+++ b/include/asm-m68knommu/unaligned.h 2005-03-17 14:03:19 -08:00
@@ -5,15 +5,7 @@
#ifdef CONFIG_COLDFIRE
-/* Use memmove here, so gcc does not insert a __builtin_memcpy. */
-
-#define get_unaligned(ptr) \
- ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp;
})
-
-#define put_unaligned(val, ptr) \
- ({ __typeof__(*(ptr)) __tmp = (val); \
- memmove((ptr), &__tmp, sizeof(*(ptr))); \
- (void)0; })
+#include <asm-generic/unaligned.h>
#else
/*