
Mike Frysinger wrote:
On Thursday 28 January 2010 07:16:20 Daniel Hellstrom wrote:
Signed-off-by: Daniel Hellstrom daniel@gaisler.com
include/asm-sparc/unaligned.h | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 include/asm-sparc/unaligned.h
diff --git a/include/asm-sparc/unaligned.h b/include/asm-sparc/unaligned.h new file mode 100644 index 0000000..4e604c1 --- /dev/null +++ b/include/asm-sparc/unaligned.h @@ -0,0 +1,17 @@ +#ifndef _ASM_SPARC_UNALIGNED_H +#define _ASM_SPARC_UNALIGNED_H
+#ifdef __KERNEL__
+/*
- The SPARC can not do unaligned accesses, it must be split into multiple
- byte accesses. The SPARC is in big endian mode.
- */
+#include <linux/unaligned/be_byteshift.h> +#include <linux/unaligned/generic.h>
+#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be
+#endif /* __KERNEL__ */ +#endif /* _ASM_SPARC_UNALIGNED_H */
there is a proposed asm-generic/unaligned.h on the mailing list which i think you could use. you'd just need: #include <asm-generic/unaligned.h> -mike
Thank you for your comment, I will update this patch.
Daniel