To be used when endianness matters for argument ordering when reassembling
a 64-bit value out of two register halves.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
---
include/linux/compat.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 0e69d2c..07bcc3c 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -267,5 +267,14 @@ asmlinkage long compat_sys_signalfd(int ufd,
asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
const struct compat_itimerspec __user *utmr);
+static inline u64 compat_merge64(u32 left, u32 right)
+{
+#if defined(__BIG_ENDIAN)
+ return ((u64)left << 32) | right;
+#else /* defined (__LITTLE_ENDIAN) */
+ return ((u64)right << 32) | left;
+#endif
+}
+
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */
--
1.5.3.2
-
| Peter Zijlstra | [PATCH 00/23] per device dirty throttling -v8 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Andrew Morton | Re: Ext3 vs NTFS performance |
git: | |
| Johannes Sixt | [PATCH 03/40] Add target architecture MinGW. |
| Sergei Organov | Newbie: report of first experience with git-rebase. |
| Scott Chacon | Git Community Book |
| Sebastian Schuberth | git on Cygwin: Not a valid object name HEAD |
| Richard Stallman | Real men don't attack straw men |
| Marius ROMAN | 1440x900 resolution problem |
| Leon Dippenaar | New tcp stack attack |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Linus Torvalds | Re: [crash] kernel BUG at net/core/dev.c:1328! |
| Frithjof Hammer | Re: [LARTC] ifb and ppp |
