diff options
Diffstat (limited to 'include/asm-powerpc/uaccess.h')
-rw-r--r-- | include/asm-powerpc/uaccess.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h index 1a0736f8803..bd0fb849515 100644 --- a/include/asm-powerpc/uaccess.h +++ b/include/asm-powerpc/uaccess.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <asm/asm-compat.h> | ||
9 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
10 | #include <asm/page.h> | 11 | #include <asm/page.h> |
11 | 12 | ||
@@ -141,12 +142,11 @@ extern long __put_user_bad(void); | |||
141 | " b 2b\n" \ | 142 | " b 2b\n" \ |
142 | ".previous\n" \ | 143 | ".previous\n" \ |
143 | ".section __ex_table,\"a\"\n" \ | 144 | ".section __ex_table,\"a\"\n" \ |
144 | " .balign %5\n" \ | 145 | PPC_LONG_ALIGN "\n" \ |
145 | PPC_LONG "1b,3b\n" \ | 146 | PPC_LONG "1b,3b\n" \ |
146 | ".previous" \ | 147 | ".previous" \ |
147 | : "=r" (err) \ | 148 | : "=r" (err) \ |
148 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err),\ | 149 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err)) |
149 | "i"(sizeof(unsigned long))) | ||
150 | 150 | ||
151 | #ifdef __powerpc64__ | 151 | #ifdef __powerpc64__ |
152 | #define __put_user_asm2(x, ptr, retval) \ | 152 | #define __put_user_asm2(x, ptr, retval) \ |
@@ -162,13 +162,12 @@ extern long __put_user_bad(void); | |||
162 | " b 3b\n" \ | 162 | " b 3b\n" \ |
163 | ".previous\n" \ | 163 | ".previous\n" \ |
164 | ".section __ex_table,\"a\"\n" \ | 164 | ".section __ex_table,\"a\"\n" \ |
165 | " .balign %5\n" \ | 165 | PPC_LONG_ALIGN "\n" \ |
166 | PPC_LONG "1b,4b\n" \ | 166 | PPC_LONG "1b,4b\n" \ |
167 | PPC_LONG "2b,4b\n" \ | 167 | PPC_LONG "2b,4b\n" \ |
168 | ".previous" \ | 168 | ".previous" \ |
169 | : "=r" (err) \ | 169 | : "=r" (err) \ |
170 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err),\ | 170 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err)) |
171 | "i"(sizeof(unsigned long))) | ||
172 | #endif /* __powerpc64__ */ | 171 | #endif /* __powerpc64__ */ |
173 | 172 | ||
174 | #define __put_user_size(x, ptr, size, retval) \ | 173 | #define __put_user_size(x, ptr, size, retval) \ |
@@ -226,12 +225,11 @@ extern long __get_user_bad(void); | |||
226 | " b 2b\n" \ | 225 | " b 2b\n" \ |
227 | ".previous\n" \ | 226 | ".previous\n" \ |
228 | ".section __ex_table,\"a\"\n" \ | 227 | ".section __ex_table,\"a\"\n" \ |
229 | " .balign %5\n" \ | 228 | PPC_LONG_ALIGN "\n" \ |
230 | PPC_LONG "1b,3b\n" \ | 229 | PPC_LONG "1b,3b\n" \ |
231 | ".previous" \ | 230 | ".previous" \ |
232 | : "=r" (err), "=r" (x) \ | 231 | : "=r" (err), "=r" (x) \ |
233 | : "b" (addr), "i" (-EFAULT), "0" (err), \ | 232 | : "b" (addr), "i" (-EFAULT), "0" (err)) |
234 | "i"(sizeof(unsigned long))) | ||
235 | 233 | ||
236 | #ifdef __powerpc64__ | 234 | #ifdef __powerpc64__ |
237 | #define __get_user_asm2(x, addr, err) \ | 235 | #define __get_user_asm2(x, addr, err) \ |
@@ -249,13 +247,12 @@ extern long __get_user_bad(void); | |||
249 | " b 3b\n" \ | 247 | " b 3b\n" \ |
250 | ".previous\n" \ | 248 | ".previous\n" \ |
251 | ".section __ex_table,\"a\"\n" \ | 249 | ".section __ex_table,\"a\"\n" \ |
252 | " .balign %5\n" \ | 250 | PPC_LONG_ALIGN "\n" \ |
253 | PPC_LONG "1b,4b\n" \ | 251 | PPC_LONG "1b,4b\n" \ |
254 | PPC_LONG "2b,4b\n" \ | 252 | PPC_LONG "2b,4b\n" \ |
255 | ".previous" \ | 253 | ".previous" \ |
256 | : "=r" (err), "=&r" (x) \ | 254 | : "=r" (err), "=&r" (x) \ |
257 | : "b" (addr), "i" (-EFAULT), "0" (err), \ | 255 | : "b" (addr), "i" (-EFAULT), "0" (err)) |
258 | "i"(sizeof(unsigned long))) | ||
259 | #endif /* __powerpc64__ */ | 256 | #endif /* __powerpc64__ */ |
260 | 257 | ||
261 | #define __get_user_size(x, ptr, size, retval) \ | 258 | #define __get_user_size(x, ptr, size, retval) \ |