From: Harvey Harrison <harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: linux-arch <linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Yoshinori Sato
<ysato-Rn4VEauK+AKRv+LV9MX5uooqe+aC9MnS@public.gmane.org>,
Hirokazu Takata <takata-TMSiXQfHlQjsTix1lMzHGQ@public.gmane.org>,
Chris Zankel <chris-YvXeqwSYzG2sTnJN9+BGXg@public.gmane.org>
Subject: [PATCH 3/8] kernel: move arches that use the no-builtin-memcpy implementation
Date: Thu, 10 Apr 2008 12:44:07 -0700 [thread overview]
Message-ID: <1207856647.22001.27.camel@brick> (raw)
h8300, m32r, xtensa use this implementation.
Signed-off-by: Harvey Harrison <harvey.harrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
include/asm-h8300/unaligned.h | 11 +----------
include/asm-m32r/unaligned.h | 15 +--------------
include/asm-xtensa/unaligned.h | 12 +-----------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/include/asm-h8300/unaligned.h b/include/asm-h8300/unaligned.h
index ffb67f4..e8ff49d 100644
--- a/include/asm-h8300/unaligned.h
+++ b/include/asm-h8300/unaligned.h
@@ -1,15 +1,6 @@
#ifndef __H8300_UNALIGNED_H
#define __H8300_UNALIGNED_H
-
-/* 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 <linux/unaligned/no_builtin_memcpy.h>
#endif
diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h
index fccc180..5a4c931 100644
--- a/include/asm-m32r/unaligned.h
+++ b/include/asm-m32r/unaligned.h
@@ -1,19 +1,6 @@
#ifndef _ASM_M32R_UNALIGNED_H
#define _ASM_M32R_UNALIGNED_H
-/*
- * For the benefit of those who are trying to port Linux to another
- * architecture, here are some C-language equivalents.
- */
-
-#include <asm/string.h>
-
-#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 <linux/unaligned/no_builtin_memcpy.h>
#endif /* _ASM_M32R_UNALIGNED_H */
diff --git a/include/asm-xtensa/unaligned.h b/include/asm-xtensa/unaligned.h
index 2822089..45eb203 100644
--- a/include/asm-xtensa/unaligned.h
+++ b/include/asm-xtensa/unaligned.h
@@ -13,16 +13,6 @@
#ifndef _XTENSA_UNALIGNED_H
#define _XTENSA_UNALIGNED_H
-#include <linux/string.h>
-
-/* 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 <linux/unaligned/no_builtin_memcpy.h>
#endif /* _XTENSA_UNALIGNED_H */
--
1.5.5.144.g3e42
WARNING: multiple messages have this Message-ID (diff)
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arch <linux-arch@vger.kernel.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Hirokazu Takata <takata@linux-m32r.org>,
Chris Zankel <chris@zankel.net>
Subject: [PATCH 3/8] kernel: move arches that use the no-builtin-memcpy implementation
Date: Thu, 10 Apr 2008 12:44:07 -0700 [thread overview]
Message-ID: <1207856647.22001.27.camel@brick> (raw)
Message-ID: <20080410194407.3MBLqiStcYlbBVZXxH2fZLs8MDxNECuB-ksNLqEVDDs@z> (raw)
h8300, m32r, xtensa use this implementation.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
include/asm-h8300/unaligned.h | 11 +----------
include/asm-m32r/unaligned.h | 15 +--------------
include/asm-xtensa/unaligned.h | 12 +-----------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/include/asm-h8300/unaligned.h b/include/asm-h8300/unaligned.h
index ffb67f4..e8ff49d 100644
--- a/include/asm-h8300/unaligned.h
+++ b/include/asm-h8300/unaligned.h
@@ -1,15 +1,6 @@
#ifndef __H8300_UNALIGNED_H
#define __H8300_UNALIGNED_H
-
-/* 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 <linux/unaligned/no_builtin_memcpy.h>
#endif
diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h
index fccc180..5a4c931 100644
--- a/include/asm-m32r/unaligned.h
+++ b/include/asm-m32r/unaligned.h
@@ -1,19 +1,6 @@
#ifndef _ASM_M32R_UNALIGNED_H
#define _ASM_M32R_UNALIGNED_H
-/*
- * For the benefit of those who are trying to port Linux to another
- * architecture, here are some C-language equivalents.
- */
-
-#include <asm/string.h>
-
-#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 <linux/unaligned/no_builtin_memcpy.h>
#endif /* _ASM_M32R_UNALIGNED_H */
diff --git a/include/asm-xtensa/unaligned.h b/include/asm-xtensa/unaligned.h
index 2822089..45eb203 100644
--- a/include/asm-xtensa/unaligned.h
+++ b/include/asm-xtensa/unaligned.h
@@ -13,16 +13,6 @@
#ifndef _XTENSA_UNALIGNED_H
#define _XTENSA_UNALIGNED_H
-#include <linux/string.h>
-
-/* 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 <linux/unaligned/no_builtin_memcpy.h>
#endif /* _XTENSA_UNALIGNED_H */
--
1.5.5.144.g3e42
next reply other threads:[~2008-04-10 19:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 19:44 Harvey Harrison [this message]
2008-04-10 19:44 ` [PATCH 3/8] kernel: move arches that use the no-builtin-memcpy implementation Harvey Harrison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1207856647.22001.27.camel@brick \
--to=harvey.harrison-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=chris-YvXeqwSYzG2sTnJN9+BGXg@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=takata-TMSiXQfHlQjsTix1lMzHGQ@public.gmane.org \
--cc=ysato-Rn4VEauK+AKRv+LV9MX5uooqe+aC9MnS@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.