linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] using get/put_user64 apis on 64bit machine
@ 2012-07-23 10:16 Bharat Bhushan
  2012-09-10  4:42 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Bharat Bhushan @ 2012-07-23 10:16 UTC (permalink / raw)
  To: linuxppc-dev, galak, agraf, scottwood; +Cc: Bharat Bhushan

On powerpc64 machine get/put_user64() is same as get/put_user() while
on powerpc32 machine get_user64 is different. With this patch we can
use get_user64() and put_user64() on 32 and 64 bit machines.

Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
---
 arch/powerpc/include/asm/uaccess.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
index 17bb40c..01743aa 100644
--- a/arch/powerpc/include/asm/uaccess.h
+++ b/arch/powerpc/include/asm/uaccess.h
@@ -114,10 +114,17 @@ struct exception_table_entry {
 #define __put_user(x, ptr) \
 	__put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
 
+/*
+ * On powerpc64 machine get/put_user64() is same as get/put_user() while
+ * on powerpc32 machine get_user64 is different.
+ */
 #ifndef __powerpc64__
 #define __get_user64(x, ptr) \
 	__get_user64_nocheck((x), (ptr), sizeof(*(ptr)))
 #define __put_user64(x, ptr) __put_user(x, ptr)
+#else
+#define __get_user64(x, ptr) __get_user(x, ptr) 
+#define __put_user64(x, ptr) __put_user(x, ptr)
 #endif
 
 #define __get_user_inatomic(x, ptr) \
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-10 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 10:16 [PATCH] using get/put_user64 apis on 64bit machine Bharat Bhushan
2012-09-10  4:42 ` Benjamin Herrenschmidt
2012-09-10  8:50   ` Bhushan Bharat-R65777
2012-09-10 22:25     ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).