We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06bff6b commit d2ad824Copy full SHA for d2ad824
arch/parisc/include/asm/uaccess.h
@@ -40,7 +40,7 @@ static inline long access_ok(int type, const void __user * addr,
40
#define get_user __get_user
41
42
#if !defined(CONFIG_64BIT)
43
-#define LDD_USER(ptr) BUILD_BUG()
+#define LDD_USER(ptr) __get_user_asm64(ptr)
44
#define STD_USER(x, ptr) __put_user_asm64(x, ptr)
45
#else
46
#define LDD_USER(ptr) __get_user_asm("ldd", ptr)
@@ -114,6 +114,20 @@ struct exception_data {
114
: "r"(ptr), "1"(__gu_err) \
115
: "r1");
116
117
+#if !defined(CONFIG_64BIT)
118
+
119
+#define __get_user_asm64(ptr) \
120
+ __asm__("\n1:\tldw 0(%%sr2,%2),%0" \
121
+ "\n2:\tldw 4(%%sr2,%2),%R0\n\t" \
122
+ ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_get_user_skip_2)\
123
+ ASM_EXCEPTIONTABLE_ENTRY(2b, fixup_get_user_skip_1)\
124
+ : "=r"(__gu_val), "=r"(__gu_err) \
125
+ : "r"(ptr), "1"(__gu_err) \
126
+ : "r1");
127
128
+#endif /* !defined(CONFIG_64BIT) */
129
130
131
#define __put_user(x, ptr) \
132
({ \
133
register long __pu_err __asm__ ("r8") = 0; \
0 commit comments